mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-03 22:25:53 +00:00
We used to insert extra spaces to ensure that the content respected the four-space rule. That is not really necessary now, since pandoc's markdown and most markdowns don't follow the four-space rule. Those who want the old behavior can obtain it by using `-t markdown+four_space_rule`. Closes #7172.
42 lines
661 B
Markdown
42 lines
661 B
Markdown
# TOC in gfm contains no HTML by default
|
|
```
|
|
% pandoc --to=gfm --toc --standalone
|
|
# Head
|
|
|
|
Content
|
|
^D
|
|
- [Head](#head)
|
|
|
|
# Head
|
|
|
|
Content
|
|
```
|
|
|
|
# Same in Markdown if link_attributes extension is disabled
|
|
```
|
|
% pandoc --to=markdown-link_attributes --toc --standalone
|
|
# Head
|
|
|
|
Content
|
|
^D
|
|
- [Head](#head)
|
|
|
|
# Head
|
|
|
|
Content
|
|
```
|
|
|
|
# IDs are added to TOC with the "attributes" CommonMark extension
|
|
```
|
|
% pandoc --to=commonmark+gfm_auto_identifiers+attributes --toc -s
|
|
# Nam a sapien
|
|
|
|
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
|
^D
|
|
- [Nam a sapien](#nam-a-sapien){#toc-nam-a-sapien}
|
|
|
|
# Nam a sapien
|
|
|
|
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
|
```
|