Enumerated lists without explicit number, ATX headings with explicit number

Okay, so your position is—correct me if I’m wrong:

  1. Using "0) " or "1. " is counter-intuitive,
  2. while ") " or ". " is (somehow) intuitive enough;
  3. but typing the correct individual numeral is too much work in any case,
  4. and there are no tools available or even imaginable to do so,
  5. therefore the CommonMark syntax should be changed.

I can’t answer anything (reasonable) to that …

[And note that I just did the seemingly impossible, and did type “⎵1.⎵”, “⎵2.⎵”, “⎵3.⎵”, “⎵4.⎵”, and “⎵5.⎵” into my browser’s shabby text area box: thats five different numbers! :stuck_out_tongue_winking_eye: ]

Obviously, “⎵” is meant to represent SPACE.


As far as I can tell from your explanation of what you mean by “attributes” (and I guess that “MD/CM” means “Markdown/CommonMark”, not “1500/900”, right? :wink: ), it seems that attribute is first of all the name of a non-terminal in your grammar; and if I understand correctly, you then go on and say that the matching sub-string for this production (ie, the alphanum*) is the value of this “anonymous attribute”?

And I guess that by “line marker” you must must mean a (missing) non-terminal, possibly like this:

line: line-marker content? suffix? trailing?;
line-marker:  indent? prefix?

Now your grammar’s prefix production obviously generates the strings “.⎵” and “)⎵”, but in an ambiguous way:

  • either attribute is missing (it is marked by ? as always being optional),
  • or attribute is there, but matches an empty sequence of alphanum – (which I guess is the usual character class).

I have no idea what the undefined phrase could be, except that it ought to contain the important stuff.


All in all I honestly fail to see your point here: if the CommonMark specification and your grammar (or parser) disagree: why should the former need to change?

Btw, I’m actually interested in a (context-free or not) grammar that could correctly define CommonMark (and have some unpublished material on this myself), but your grammar so far looks not that similar to what I would expect.