# Keeping hints about alternate syntax used in the AST

**URL:** <https://talk.commonmark.org/t/keeping-hints-about-alternate-syntax-used-in-the-ast/1989>\
**Category:** Spec\
**Created:** [January 14, 2016, 8:19am UTC](https://talk.commonmark.org/t/keeping-hints-about-alternate-syntax-used-in-the-ast/1989 "2016-01-14T08:19:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Crissov](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/crissov/32/1455_2.png) [@Crissov](https://talk.commonmark.org/u/Crissov)\
**Post date:** [January 14, 2016, 7:54pm UTC](https://talk.commonmark.org/t/keeping-hints-about-alternate-syntax-used-in-the-ast/1989/3 "2016-01-14T19:54:43Z")

</div>

That’s what I assumed.  
The delimiters are not directly supported in HTML, though, just with CSS. But if we take that into account, there‘s also a case for the bullets which could be correlated with presentational HTML 3/4, e.g. `*` → `disc`, `+` → `circle`, `-` → `square`.  
If I remember correctly, Latex does not support `item` styles for `enumerate` environments out of the box, i.e. a package like `enumitem` or `enumerate` was needed or each item’s label would have to be generated explicitly (including the number).

If a hint about actual marker used was available in the AST, someone could write filters or extensions that did something more reasonable like the following:

- Treat [underscore emphasis as `i` and `b`](https://talk.commonmark.org/t/a-proposal-to-support-the-mark-tag-with-markdown/1981/4?u=crissov) in HTML5 output,  
maybe even `u` (or `ins`?) for quadruple underscores.
- Auto-number ATX headings, don’t number Setext headings or  
don’t put Setext headings into an automatically generated TOC or  
generate HTML5 `section`s for ATX headings only or  
do any combination thereof.
- Treat one or two of the “thematic break” alternatives as [`section` boundaries](https://talk.commonmark.org/t/horizontal-rules-as-hierarchical-section-breaks-etc/1241) in HTML5 output.  
(@Dmitry once suggested to use [“boundary”](https://talk.commonmark.org/t/ordered-vs-unordered-list/1945/19?u=crissov) instead of “horizontal rule” or “thematic break”.)
- [Render images or formatted text](https://talk.commonmark.org/t/mermaid-generation-of-diagrams-and-flowcharts-from-text-in-a-similar-manner-as-markdown/1882/10?u=crissov) for certain code blocks with tilde fences, but restrict to syntax-highlighting for back-tick fences. They could also differ just in default values for the parser-dependent info-string “attributes”, e.g. preset language, line numbers, whitespace visibility.

---

_[View the full topic](https://talk.commonmark.org/t/keeping-hints-about-alternate-syntax-used-in-the-ast/1989)._
