This is absolutely correct, but has nothing to do with my argument: by conflating the syntax of “ATX headings” and “numbered section heading”, you change the expressiveness of CommonMark in this regard from formerly
- there’s only one kind of heading, and it may or may not be rendered with automatic numbering.
(ignoring setext headings for now) to the new situation:
- there’s only one kind of heading, and it will be rendered with automatic numbering (at least that’s the stated intent).
Maybe you could point to an advantage incurred by making ATX headings and numbered section headings indistinguishable in the input syntax?
The alleged two-spaces convention is hardly less user-unfriendly than the original Markdown line break syntax with two spaces.
If insinuating that I made-up an alleged two-space convention is all you can bring as (or rather in place of) an argument, it primarily shows that you have no clue how section headings were actually type-written for decades, and are printed today.
And your crude assertion that this is hardly less user-unfriendly than two SPACE characters at the end of a line is utterly baffling in another way: do you really fail to see the difference between
- one or more SPACE characters between graphical characters on the one side, and
- one or more SPACE characters followed by an—usually invisible—end-of-line control character?
If so, what do you think might be the reason for the existence of a variety of typographical spaces that has been in use not just for decades like more-or-less modern typewriters, but rather for centuries?
You see runs of digits as valid line markers. I don’t. I only consider ASCII punctuation marks as possible line markers. Alphanumerics can only be attribute values or proper textual content (and punctuation marks like # cannot).
Hacking my way through this jungle of jargon, and using the assumptions that
-
“line marker” is a prefix in an input line that signals a specific “type” or interpretation of this line;
-
“attribute values” mean again a (maximally?) matching sub-string of characters in the alphanumeric class contained in such a prefix;
-
“proper textual content” is that portion in the input syntax that ends up as element character content in the output;
I guess my answer is: no, I do not see runs of digits as valid line markers any more than you do. But I would in fact see
numbered section marker = BOL , Digit , { Digit } , { "." , Digit , { Digit } } , SPACE , SPACE ;
as a valid “line marker” in your assumed sense, I think (but without any “anonymous attributes”! )
[ Here “BOL” means a terminal symbol providing an anchor point at the beginning of an input line, as you may have guessed, and SP means, well, the terminal symbol U+0020 SPACE, and Digit means means the character class containing the ten decimal digits DIGIT ZERO … DIGIT NINE, just to avoid any misunderstandings. Note that NUMBER SIGN plays no role in this simplified syntax rule. — I assume you can read and understand EBNF. ]
Your mental model is obviously different from mine, […]
That’s my impression too, and maybe one reason for this is that you keep throwing around your home-made terms, like “overriding”, “fill an attribute”, “treat a number as the value of an anonymous attribute”, “line markers”.
[…] thus it’s not surprising that you find my notation “hard to recognize, use, and explain”. It is consistent, though.
Consistent it may well be, but I’m sure I’m not the only one who finds your notation at least “harder to recognize, use, and explain”.
What makes me sure in this regard is the simple observation that it is easier to visually recognize N sub-strings consisting of only decimal digits and NUMBER SIGN when they are separated by N - 1 FULL STOP characters, than it is to recognize N sub-strings when they are represented by a string comprising anything from N up to 2 × N characters (or more!) whose glyphs do all have the same vertical extent—which is what your proposed syntax produces.
In other words, you require one to “find and count the NUMBER SIGNs”, and I require one to “count the numerals separated by FULL STOP”: please note that the latter is precisely what everybody who is reading a decimal numbered section heading is doing day in and day out when reading any document that uses the most common typographical style to show section numbers in current practice …
So on the contrary, I would say it would be “not surprising” if pretty much everybody would see the difference in readability the same way I do.
But maybe we also have very different mental models about human recognition abilities, or would you accept for once my argument here?
[ Edit: Ups, I forgot to answer this one, sorry … ]
I’m not saying CommonMark should adopt that syntax, […]
You are not? Then what are we discussing here after all?
[…] but if you treated numbers in enumerated lists as the value of an anonymous attribute (like I proposed) then that would be a logical conclusion.
Assuming that this implication is true, it seems to form a nice argument why one should not treat numbers in enumerated lists as the value of an anonymous attribute [whatever…] in the way you proposed, just in order to avoid the “logical consequences”.
Your #.# would be yet another syntax which could make authors confuse headings and list items if the latter also adopted the #. syntax. With my syntax, “#
” is exclusive to headings and . is exclusive to lists.
I would rather say: my “#.#⎵⎵Foo
” is easy to confuse with “#.⎵Foo
” precisely to the degree in which, for example, “1.2⎵⎵Foo
” and “2.⎵Foo
” are easy to “confuse”. And that this syntax is “yet another syntax” in to precisely the same extent as numbering sections according to ISO 2145 is compared to numbering list items—both very common practices in vanilla documents which you can hardly call “obscure” or “easy to confuse”, or do you?
Are you really saying that you have difficulties with telling numbered section headings and numbered list items apart, as they appear in everyday (technical, presumably) documents? Or what is the the advantage you try to accomplish when “#
” is exclusive to headings and “.
” is exclusive to lists ?