feat(core): Add heading anchor plugin to markdown

ref: #270
This commit is contained in:
2024-09-12 00:49:26 +09:30
parent a8b21d7c74
commit c9d05152c9
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import re
from markdown_it import MarkdownIt
from mdit_py_plugins import admon, footnote, tasklists
from mdit_py_plugins import admon, anchors, footnote, tasklists
from pygments import highlight
from pygments.formatters.html import HtmlFormatter
@ -52,7 +52,7 @@ class TicketMarkdown:
config = "commonmark",
options_update={
'linkify': True,
'highlight': self.highlight_func
'highlight': self.highlight_func,
}
)
@ -63,6 +63,7 @@ class TicketMarkdown:
])
.use(admon.admon_plugin)
.use(anchors.anchors_plugin, permalink=True)
.use(footnote.footnote_plugin)
.use(tasklists.tasklists_plugin)
)

View File

@ -25,6 +25,8 @@ All Text fields, that is those that are multi-lined support markdown text.
- Task Lists
- Heading Anchors
## Admonitions