Module

rendering.plugins.term

Term/Glossary plugin for Mistune.

Provides {term}Wordsyntax for linking to glossary terms.

Classes

TermPlugin
Mistune plugin for {term}`Word` syntax. Syntax: {term}`Word` -> Link to /glossary/#te…
3

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.
3 int
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.
2 str
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.
1 None
def __call__(self, md: Any) -> None

Register the plugin with Mistune.

Parameters 1
md Any