Is this a hackmd.io issue?
Read our Official tutorial
It's on https://hackmd.io/c/tutorials/
or Chinese version: https://hackmd.io/c/tutorials-tw/
What's the problem
Current behaviour
[TOC] works, but [TOC maxLevel=2] is rendered as plain text and does not generate a table of contents.
Reproducible content:
[TOC maxLevel=2]
### Section
- ### Case1
- ### Case2
- ### Case3
Actual rendered result:
It is displayed as plain text instead of being parsed as TOC syntax.
Provide steps to reproduce:
-
Go to https://hackmd.io
-
Create a new note
-
Paste the content below:
[TOC maxLevel=2]
### Section
- ### Case1
- ### Case2
- ### Case3
-
Switch to preview / rendered view
-
Observe that [TOC maxLevel=2] is shown as plain text
Here is an example: https://hackmd.io/AkRF_wKqQWqpo_MJ32Veww
Expected behaviour
[TOC maxLevel=2] should be recognized as valid TOC syntax and generate a table of contents, instead of being rendered as plain text.
Environment
I use HackMD on:
Desktop
- OS: Windows / Ubuntu 24.04 / Android 14
- Browser: Chrome 147.0.7727.56 , FireFox 143.0(64 位元)
Mobile
- Device: Xiaomi Pro 13
- OS: Android 14
- Browser: Chrome 146.0.7880.177
Additional context
The official tutorial documents [TOC maxLevel=1] as supported syntax, so this behavior appears inconsistent with the documentation.
Is this a hackmd.io issue?
Read our Official tutorial
It's on https://hackmd.io/c/tutorials/
or Chinese version: https://hackmd.io/c/tutorials-tw/
What's the problem
Current behaviour
[TOC]works, but[TOC maxLevel=2]is rendered as plain text and does not generate a table of contents.Reproducible content:
Actual rendered result:
It is displayed as plain text instead of being parsed as TOC syntax.
Provide steps to reproduce:
Go to https://hackmd.io
Create a new note
Paste the content below:
Switch to preview / rendered view
Observe that
[TOC maxLevel=2]is shown as plain textExpected behaviour
[TOC maxLevel=2]should be recognized as valid TOC syntax and generate a table of contents, instead of being rendered as plain text.Environment
I use HackMD on:
Desktop
Mobile
Additional context
The official tutorial documents
[TOC maxLevel=1]as supported syntax, so this behavior appears inconsistent with the documentation.