# Should there be additional information in the AST?

**URL:** <https://talk.commonmark.org/t/should-there-be-additional-information-in-the-ast/2138>\
**Category:** Spec\
**Tags:** release-1.0\
**Created:** [June 28, 2016, 10:30am UTC](https://talk.commonmark.org/t/should-there-be-additional-information-in-the-ast/2138 "2016-06-28T10:30:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tmpfs](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/tmpfs/32/892_2.png) [@tmpfs](https://talk.commonmark.org/u/tmpfs)\
**Post date:** [January 30, 2016, 5:54am UTC](https://talk.commonmark.org/t/should-there-be-additional-information-in-the-ast/2138/2 "2016-01-30T05:54:04Z")

</div>

> [@Issues we MUST resolve before 1.0 release \[6 remaining\]](https://talk.commonmark.org/t/issues-we-must-resolve-before-1-0-release-6-remaining/1287/1):
>
> Should there be additional information in the AST? (SHOULD)
> 
> Currently we lose information about:
> 
> whether a link was an autolink  
> whether it was a reference link, what kind, and what label  
> what the bullet character was for a list item  
> what character was used for emphasis/strong emphasis  
> whether the 1. or 1) style of ordered list was used.  
> whether a code block was backtick or indented
> 
> Should some or all of these things be part of the AST, or is this too “concrete”? (This would mainly affect conversion back to CommonMark, though other renderers could decide to be sensitive to these things.)

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.

---

_[View the full topic](https://talk.commonmark.org/t/should-there-be-additional-information-in-the-ast/2138)._
