Should there be additional information in the AST?

I am all for these being available in the AST as I would like to be able to write a Commonmark compliant renderer.

I believe these have already been implemented in commonmark.js:

  • what the bullet character was for a list item (using bulletChar)
  • whether the 1. or 1) style of ordered list was used. (using listDelimiter)

In addition, as noted elsewhere:

  • the type of hard line break in use (backslash or double space)

I will add more as I come across them. With regards to the point made on github regarding not knowing where in the file link definitions are made I don’t think this is an issue, I suggest that the Document node would have a links object representing link definitions and Markdown renderers can append these to the end of the file. Whilst some information is lost the document would function correctly when re-parsed and it is my convention to always declare link definitions at the bottom of the document.