Classes
TermPlugin
Mistune plugin for {term}`Word` syntax.
Syntax:
{term}`Word` -> Link to /glossary/#te…
TermPlugin
Mistune plugin for {term}Wordsyntax.
Syntax:
{term}`Word` -> Link to /glossary/#term-word
{term}`Word Text` -> Link to /glossary/#term-word-text
Architecture:
- Runs as a standard Mistune inline plugin
- Registers a high-priority rule to capture {term}
...
Methods 2
parse_term
Parse {term}`...` syntax.
parse_term
def parse_term(self, inline: Any, m: re.Match[str], state: Any) -> int
Parse {term}...syntax.
Parameters 3
inline |
Any |
|
m |
re.Match[str] |
|
state |
Any |
Returns
int
render_term
Render term token to HTML.
render_term
def render_term(self, renderer: Any, text: str) -> str
Render term token to HTML.
Parameters 2
renderer |
Any |
|
text |
str |
Returns
str
Internal Methods 1
__call__
Register the plugin with Mistune.
__call__
def __call__(self, md: Any) -> None
Register the plugin with Mistune.
Parameters 1
md |
Any |