or
Lamak
faq
Is there a list or a list of markdown options that work in TopAnswers?. I've seen in some comments that the options in this link work here https://markdown-it.github.io/, but I'm not sure if all of them work or just some of them. 

Also, I saw that @Jack added the option to use a markdown for dbfiddle (which is great!), but I know this because I read the comment, so I think it should be good to have an updated list somewhere.
Top Answer
Jack Douglas
We are using [markdown-it](https://github.com/markdown-it/markdown-it), which:

* Has a useful [demo] page that you linked to in the question.

* Follows the [CommonMark] spec, except that on TopAnswers we ***[don't allow HTML input at all][safe]***, so no `<br>`, `sup` etc [that you can use on SE][sehtml][^pluginforhtml][^plugin].

* Isn't otherwise a radical departure from Markdown on SE, but there are a few more gotcha's such as:

    1. Strikethrough in SE chat is `---strikethrough---` but CommonMark does not support strikethrough (however see below for our plugin support for `~~strikethrough~~`).

    1. Markdown-it doesn't collapse adjacent blockquotes into a single blockquote:
    
        ```
        > this is two

        > blockquotes

        > this is a single
        >
        > blockquote with two paragraphs
        ```

    1. Various other minor details from [this official CommonMark list][cmdiffs].
    
* Has some very sensible optional extensions (plugins) built-in — these are not part of the CommonMark spec but we have them switched on globally:
    1. GitHub-style [strikethrough]
    1. GitHub-style [tables]
    
* Has extensive support for other extensions, and we can add more or even create our own[^plugin].

    * The following 'official'[^moreplugins] extensions are currently supported globally on TopAnswers:
        1. [linkify]
        1. [syntax highlighting][highlight][^syntax]
        1. [superscript][^supersub]
        1. [subscript][^supersub]
        1. [abbreviations][abbr]
        1. [definition lists][deflist]
        1. [footnotes]
        1. [emoji]
        
    * The following custom extensions are also currently supported globally:

        * tweaking 'fuzzy' `dba.se` links to point to `dba.stackexchange.com`
        
    * Not actually a markdown plugin presently, but may be implemented as a plugin in future, and behaves similar to a plugin now:
        * integration with [db<>fiddle], using this block level syntax:
            ```
            <>https://dbfiddle.uk/?rdbms=postgres_11&fiddle=71940aadda50f55bfede87606cd1dc2c`
            ```
    
[^pluginforhtml]: If you miss something that you can only do in with inline HTML on SE, it may be available as a plugin for markdown-it, or we can write our own.
[^plugin]: We'll need to be careful about adding non-standard syntax, but all requests for plugin support will be carefully considered — please ask here on meta for global support or with a meta question on the community site if it is site-specific like [MathML] or [Mathjax].
[^moreplugins]: There are a lot of other plugins, probably of widely varying quality and sanity, [listed on npm][npm]
[^syntax]: To chose a language for a code block, you need to use a [fenced code block](https://spec.commonmark.org/0.27/#fenced-code-blocks) and specify the language after the fence (e.g. `~~~none`, or the same with backticks ` ```none`)
[^supersub]: Note that spaces currently [need to be escaped](https://github.com/markdown-it/markdown-it-sup/issues/3) if you want to super/subscript multiple words (demo [here](https://markdown-it.github.io/#md3=%7B%22source%22%3A%22-%20not%20%5Eup%2C%20up%2C%20and%20away%5E%20%28%3D%20superscript%20ignored%29%5Cn-%20%26nbsp%3B%5Cn-%20but%20%5Eup%2C%5C%5C%20up%2C%5C%5C%20and%5C%5C%20away%5E%20%5Cn%5Cnor%20%5Cn%5Cn-%20not%20~swing%20low~%20%28%3D%20subscript%20ignored%29%5Cn-%20but%20~swing%5C%5C%20low~%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D)).

[demo]: https://markdown-it.github.io
[CommonMark]: https://commonmark.org
[safe]: https://talk.commonmark.org/t/make-commonmark-safe-by-default/1265
[sehtml]: https://meta.stackexchange.com/a/135909
[cmdiffs]: https://github.com/commonmark/commonmark-spec#user-content-differences-from-original-markdown
[MathML]: https://github.com/runarberg/markdown-it-math
[Mathjax]: https://github.com/classeur/markdown-it-mathjax
[strikethrough]: https://help.github.com/articles/basic-writing-and-formatting-syntax/#styling-text
[tables]: https://help.github.com/articles/organizing-information-with-tables
[linkify]: https://github.com/markdown-it/markdown-it#linkify
[highlight]: https://github.com/markdown-it/markdown-it#syntax-highlighting
[superscript]: https://github.com/markdown-it/markdown-it-sup
[subscript]: https://github.com/markdown-it/markdown-it-sub
[abbr]: https://github.com/markdown-it/markdown-it-abbr
[deflist]: https://github.com/markdown-it/markdown-it-deflist
[footnotes]: https://github.com/markdown-it/markdown-it-footnote 
[emoji]: https://github.com/markdown-it/markdown-it-emoji
[db<>fiddle]: https://dbfiddle.uk
[npm]: https://www.npmjs.com/search?q=keywords:markdown-it-plugin
What markdown options are available?
Jack Douglas replying to Jonathan Mee
or "[ a more visible alternative, a backslash before the line ending may be used instead of two spaces](https://spec.commonmark.org/0.27/#hard-line-break)"
Paul White replying to Jonathan Mee
Two spaces at the end of the line, like SE
Jonathan Mee
I notice that `<br>` is explicitly disallowed. Is there an option in our markdown?
Jack Douglas replying to David
cheers @David, I've added those notes to the answer :)
David replying to Jack Douglas
Also, [here's a wee demo showing the escaping thing](https://is.gd/27lLRW) (also a test of that URL shortener). (The latter being a subject for another day.)
David replying to Jack Douglas
I [thought it was a bug](https://github.com/markdown-it/markdown-it-sup/issues/3)! 😅
Jack Douglas replying to David
that useful — I didn't know you could escape the spaces. You can ~also~ ~do~ ~this~ (`~also~ ~do~ ~this~`) which isn't as good…
David
(p.s. Nice to see how that markdown is handled in "chat"!)
David
@Jack Perhaps worth noting for the record (just in case anyone else likes misusing Markdown like I do) that the `sup` and `sub` extensions:   

- don't nest; and  
- are broken by whitespace.   

The workaround for the latter is to escape the whitespace: not `^up, up, and away^` (superscript ignored), but `^up,\ up,\ and\ away^` (superscript applied).
i-one replying to Jack Douglas
Thanks, I've made minor amendment to the answer.
Jack Douglas replying to i-one
I've updated the answer here with info (you can see the changes in the history: https://topanswers.xyz/answer-history?id=44). Basically you need to use a fenced code block and specify the language. Each community can set a default language which can then be overridden with 'none'.
i-one
@Jack, how can I specify language for the code block? In SO I've used `<!-- language:lang-sql -->` for example (placed before code block). There is the need sometimes to specify language explicitly, such as `sql` or `xml` or `none`.