# Support for Extension Token

**URL:** <https://talk.commonmark.org/t/support-for-extension-token/2771>\
**Category:** Extensions\
**Created:** [March 28, 2018, 8:29pm UTC](https://talk.commonmark.org/t/support-for-extension-token/2771 "2018-03-28T20:29:39Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![jgm](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/jgm/32/1360_2.png) [@jgm](https://talk.commonmark.org/u/jgm)\
**Post date:** [March 29, 2018, 4:03am UTC](https://talk.commonmark.org/t/support-for-extension-token/2771/7 "2018-03-29T04:03:54Z")

</div>

In fact, there are a few different kinds of extensions you need  
to make room for:

1. operate on raw text and yield a block element
2. operate on raw text and yield an inline element
3. operate on commonmark block content and yield a block element
4. operate on commonmark inline content and yield an inline element

In pandoc, we’ve developed a system that works well for all four.

1. fenced code block with structured attributes or a “raw”  
annotation

2. inline code backticks with structured attributes or a “raw”  
annotation

3. fenced div with structured attributes

4. bracketed inlines (as in links) with structured attributes

The attributes can be intercepted in a filter which can do  
as it likes with the contents.

This has been quite a flexible system, and it degrades well  
(in pandoc) when you don’t have the filter.

---

_[View the full topic](https://talk.commonmark.org/t/support-for-extension-token/2771)._
