2021-03-25 21:20:45 +00:00
|
|
|
# HedgeDoc Flavored Markdown
|
|
|
|
|
2023-02-05 21:05:02 +00:00
|
|
|
HedgeDoc has its own markdown dialect which supports many features from [CommonMark][commonmark]
|
|
|
|
and [Github Flavored Markdown][gfm]. It also adds some new extensions and is missing some.
|
2021-03-25 21:20:45 +00:00
|
|
|
|
2021-03-28 18:24:45 +00:00
|
|
|
These tables tell you what exactly we support in HedgeDoc 1.x (HFM 1) and HedgeDoc 2 (HFM 2).
|
2021-03-25 21:20:45 +00:00
|
|
|
|
|
|
|
## Typography
|
|
|
|
|
2023-02-22 15:54:17 +00:00
|
|
|
| Feature | HFM 1 | HFM 2 | CommonMark | GFM |
|
|
|
|
| ------------- | :---: | :---: | :---------------: | :---------------: |
|
|
|
|
| bold | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| italic | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| underline | ☑️ | ☑️ | (☑️ with `<ins>`) | (☑️ with `<ins>`) |
|
|
|
|
| strikethrough | ☑️ | ☑️ | (☑️ with `<del>`) | ☑️ |
|
|
|
|
| subscript | ☑️ | ☑️ | (☑️ with `<sub>`) | (☑️ with `<sub>`) |
|
|
|
|
| superscript | ☑️ | ☑️ | (☑️ with `<sup>`) | (☑️ with `<sup>`) |
|
|
|
|
| marked | ☑️ | ☑️ | (☑️ with `<mark>`) | (☑️ with `<mark>`) |
|
2021-03-25 21:20:45 +00:00
|
|
|
|
|
|
|
## Extended typography features
|
|
|
|
|
2023-02-22 15:54:17 +00:00
|
|
|
| Feature | HFM 1 | HFM 2 | CommonMark | GFM |
|
|
|
|
| ------------------------------------------- | :----------------------: | :----------------------: | :--------: | :---: |
|
|
|
|
| heading | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| inline code | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| indented code blocks | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| code block with language[^highlight] | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| code block with extra features[^extra-code] | ☑️ | ☑️ | | |
|
|
|
|
| block quote | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| name tag (`[name=...]`) | (☑️)[^in-bq-list] | ☑️ | | |
|
|
|
|
| time tag (`[time=...]`) | (☑️)[^in-bq-list] | ☑️ | | |
|
|
|
|
| color tag (`[color=...]`) | (☑️)[^in-bq-list] | ☑️ | | |
|
|
|
|
| unorderd list | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| ordered list | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| task list | ☑️ | ☑️ | | ☑️ |
|
|
|
|
| defition list | ☑️ | ☑️ | | |
|
|
|
|
| emoji | [Unicode 6.1][unicode-6] | [Unicode 13][unicode-13] | | |
|
2023-02-05 21:05:02 +00:00
|
|
|
| [ForkAwesome][fa] | ☑️ with `<i class='fa'>` | removed | | |
|
|
|
|
| [Bootstrap Icons][bootstrap-icons] | | ☑️ with shortcodes | | |
|
2023-02-22 15:54:17 +00:00
|
|
|
| LaTeX | ☑️[^mj] | ☑️[^kt] | | |
|
2021-03-25 21:20:45 +00:00
|
|
|
|
2021-03-28 18:24:45 +00:00
|
|
|
[^highlight]: Code blocks with a given language are rendered using syntax highlighting.
|
2021-03-25 21:20:45 +00:00
|
|
|
[^extra-code]: Several special "language" keywords can be used for rendering diagrams, charts, etc.
|
2021-03-28 18:24:45 +00:00
|
|
|
[^in-bq-list]: Use of these tags is only supported within blockquotes and (un)ordered lists.
|
2021-03-25 21:20:45 +00:00
|
|
|
[^mj]: LaTeX is rendered with [MathJax][mathjax].
|
|
|
|
[^kt]: LaTeX is rendered with [KaTeX][katex].
|
|
|
|
|
|
|
|
## Links & Images
|
|
|
|
|
2023-02-22 15:54:17 +00:00
|
|
|
| Feature | HFM 1 | HFM 2 | CommonMark | GFM |
|
|
|
|
| --------------------- | :---: | :---: | :--------------: | :--------------: |
|
|
|
|
| link | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| link reference | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| link title | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| autolink with `<>` | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| autolink without `<>` | ☑️ | ☑️ | | ☑️ |
|
|
|
|
| footnotes | ☑️ | ☑️ | | |
|
|
|
|
| image | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| image with given size | ☑️ | ☑️ | (☑️ with `<img>`) | (☑️ with `<img>`) |
|
|
|
|
| table of contents | ☑️ | ☑️ | | |
|
2021-03-25 21:20:45 +00:00
|
|
|
|
|
|
|
## Structural elements
|
|
|
|
|
2023-02-22 15:54:17 +00:00
|
|
|
| Feature | HFM 1 | HFM 2 | CommonMark | GFM |
|
|
|
|
| ----------------- | :------------------: | :---: | :------------------: | :------------------: |
|
|
|
|
| table | ☑️ | ☑️ | (☑️ with `<table>`) | ☑️ |
|
|
|
|
| horizontal line | ☑️ | ☑️ | ☑️ | ☑️ |
|
|
|
|
| collapsable block | (☑️ with `<details>`) | ☑️ | (☑️ with `<details>`) | (☑️ with `<details>`) |
|
|
|
|
| Alerts | ☑️ | ☑️ | | |
|
2021-03-25 21:20:45 +00:00
|
|
|
|
|
|
|
## Embeddings
|
2023-02-05 21:05:02 +00:00
|
|
|
|
|
|
|
HFM 1 includes support for certain embeddings of external content by using the `{%keyword parameter %}` syntax. To
|
|
|
|
increase the readability of the markdown code we decided that HFM 2 should just use plain links if possible.
|
2021-03-25 21:20:45 +00:00
|
|
|
|
2023-02-22 15:54:17 +00:00
|
|
|
| Feature | HFM 1 | HFM 2 | CommonMark | GFM |
|
|
|
|
| --------------------------------------------------- | :---: | :---------------------: | :--------: | :---: |
|
|
|
|
| PDF (`{%pdf ... %}`) | ☑️ | removed | | |
|
|
|
|
| [YouTube][youtube] (`{%youtube ... %}`) | ☑️ | with plain link[^embed] | | |
|
|
|
|
| [Vimeo][vimeo] (`{%vimeo ... %}`) | ☑️ | with plain link[^embed] | | |
|
|
|
|
| [Slideshare][slideshare] (`{%slideshare ... %}`) | ☑️ | removed | | |
|
|
|
|
| [Speakerdeck][speakerdeck] (`{%speakerdeck ... %}`) | ☑️ | removed | | |
|
|
|
|
| [GitHub Gist][gist] (`{%gist ... %}`) | ☑️ | with plain link[^embed] | | |
|
2021-03-25 21:20:45 +00:00
|
|
|
|
2023-02-05 21:05:02 +00:00
|
|
|
[^embed]: The special syntax from HFM 1 is deprecated, but will still work in HFM 2. However, a plain link to the
|
|
|
|
content should be used.
|
2021-03-25 21:20:45 +00:00
|
|
|
|
|
|
|
## HTML
|
2023-02-05 21:05:02 +00:00
|
|
|
|
|
|
|
Besides the basic HTML typography elements (`<p>`, `<a>`, `<b>`, `<ins>`, `<del>`) the following more special HTML
|
|
|
|
elements are supported by some specification.
|
2021-03-25 21:20:45 +00:00
|
|
|
|
2023-02-22 15:54:17 +00:00
|
|
|
| Feature | HedgeDocMark 1 | HedgeDocMark 2 | CommonMark | GFM |
|
|
|
|
| :-----------: | :------------: | :------------: | :--------: | :---: |
|
|
|
|
| `<title>` | | | ☑️ | |
|
|
|
|
| `<textarea>` | | ☑️ | ☑️ | |
|
|
|
|
| `<style>` | ☑️ | ☑️ | ☑️ | |
|
|
|
|
| `<xmp>` | | | ☑️ | |
|
|
|
|
| `<iframe>` | ☑️ | ☑️ | ☑️ | |
|
|
|
|
| `<noembed>` | ☑️ | | ☑️ | |
|
|
|
|
| `<noframes>` | ☑️ | | ☑️ | |
|
|
|
|
| `<script>` | | | ☑️ | |
|
|
|
|
| `<plaintext>` | | ☑️ | ☑️ | |
|
2021-03-25 21:20:45 +00:00
|
|
|
|
|
|
|
[fa]: https://forkaweso.me/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
|
|
|
[bootstrap-icons]: https://icons.getbootstrap.com/
|
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[youtube]: https://www.youtube.com/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[vimeo]: https://vimeo.com/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[slideshare]: https://www.slideshare.net/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[speakerdeck]: https://speakerdeck.com/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[gist]: https://gist.github.com/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[mathjax]: https://www.mathjax.org/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[katex]: https://katex.org/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[gfm]: https://github.github.com/gfm/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[commonmark]: https://spec.commonmark.org/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[unicode-6]: https://unicode.org/versions/Unicode6.1.0/
|
2023-02-05 21:05:02 +00:00
|
|
|
|
2021-03-25 21:20:45 +00:00
|
|
|
[unicode-13]: https://unicode.org/versions/Unicode13.0.0/
|