markdown-it-py API reference
51 public APIs from markdown-it-py (executablebooks/markdown-it-py) — 7 classes, 18 functions, 26 methods. Signatures extracted by static analysis of the actual source.
Repository: executablebooks/markdown-it-py
| Kind | Count |
|---|---|
| Classes | 7 |
| Functions | 18 |
| Methods | 26 |
API list
func
markdown_it.cli.parse.convert_file(filename:str) -> NoneParse a Markdown file and dump the output to stdout.
func
markdown_it.cli.parse.convert_stdin() -> NoneParse a Markdown file and dump the output to stdout.
func
markdown_it.cli.parse.interactive() -> NoneParse user input, dump to stdout, rinse and repeat.
func
markdown_it.cli.parse.parse_args(args:Sequence[str] | None) -> argparse.NamespaceParse input CLI arguments.
func
markdown_it.common.normalize_url.normalizeLinkText(url:str) -> strNormalize autolink content :: <destination> ~~~~~~~~~~~
func
markdown_it.common.normalize_url.validateLink(url:str, validator:Callable[[str], bool] | None=None) -> boolValidate URL link is allowed in output.
func
markdown_it.common.utils.fromCodePoint(c:int) -> strConvert ordinal to unicode.
func
markdown_it.common.utils.isMdAsciiPunct(ch:int) -> boolMarkdown ASCII punctuation characters.
func
markdown_it.common.utils.isPunctChar(ch:str) -> boolCheck if character is a punctuation character.
func
markdown_it.common.utils.isSpace(code:int | None) -> boolCheck if character code is a whitespace.
func
markdown_it.common.utils.isStrSpace(ch:str | None) -> boolCheck if character is a whitespace.
func
markdown_it.common.utils.isWhiteSpace(code:int) -> boolZs (unicode class) || [\t\f\v\r\n]
func
markdown_it.common.utils.normalizeReference(string:str) -> strHelper to unify [reference labels].
func
markdown_it.common.utils.stripEscape(string:str) -> strStrip escape \ characters
class
markdown_it.parser_block.ParserBlockParserBlock#ruler -> Ruler [[Ruler]] instance.
method
markdown_it.parser_block.ParserBlock.tokenize(state:StateBlock, startLine:int, endLine:int) -> NoneGenerate tokens for input range.
class
markdown_it.presets.gfm_likeGitHub Flavoured Markdown (GFM) like.
class
markdown_it.presets.gfm_like2GitHub Flavoured Markdown (GFM) like, extended.
class
markdown_it.renderer.RendererHTMLContains render rules for tokens.
method
markdown_it.renderer.RendererHTML.render(tokens:Sequence[Token], options:OptionsDict, env:EnvType) -> strTakes token stream and generates HTML.
method
markdown_it.renderer.RendererHTML.renderAttrs(token:Token) -> strRender token attributes to string.
method
markdown_it.renderer.RendererHTML.renderToken(tokens:Sequence[Token], idx:int, options:OptionsDict, env:EnvType) -> strDefault token renderer.
func
markdown_it.rules_core.inline.inline(state:StateCore) -> NoneParse inlines
func
markdown_it.rules_core.linkify.linkify(state:StateCore) -> NoneRule for identifying plain-text links.
func
markdown_it.rules_inline.escape.escape(state:StateInline, silent:bool) -> boolProcess escaped chars and hardbreaks.
func
markdown_it.rules_inline.linkify.linkify(state:StateInline, silent:bool) -> boolRule for identifying plain-text links.
method
markdown_it.token.Token.attrItems() -> list[tuple[str, str | int | float]]Get (key, value) list of attrs.
method
markdown_it.token.Token.attrJoin(name:str, value:str) -> NoneJoin value to existing attribute via space.
method
markdown_it.token.Token.attrPush(attrData:tuple[str, str | int | float]) -> NoneAdd `[ name, value ]` attribute to list.
method
markdown_it.token.Token.attrSet(name:str, value:str | int | float) -> NoneSet `name` attribute to `value`.
method
markdown_it.token.Token.copy(**changes:Any) -> TokenReturn a shallow copy of the instance.
method
markdown_it.token.Token.from_dict(dct:MutableMapping[str, Any]) -> TokenConvert a dict to a Token.
class
markdown_it.tree.SyntaxTreeNodeA Markdown syntax tree node.
method
markdown_it.tree.SyntaxTreeNode.attrs() -> dict[str, str | int | float]Html attributes.
method
markdown_it.tree.SyntaxTreeNode.block() -> boolTrue for block-level tokens, false for inline tokens.
method
markdown_it.tree.SyntaxTreeNode.hidden() -> boolIf it's true, ignore this element when rendering.
method
markdown_it.tree.SyntaxTreeNode.info() -> strfence infostring
method
markdown_it.tree.SyntaxTreeNode.is_nested() -> boolIs this node nested?.
method
markdown_it.tree.SyntaxTreeNode.is_root() -> boolIs the node a special root node?
method
markdown_it.tree.SyntaxTreeNode.level() -> intnesting level, the same as `state.level`
method
markdown_it.tree.SyntaxTreeNode.map() -> tuple[int, int] | NoneSource map info.
method
markdown_it.tree.SyntaxTreeNode.markup() -> str'*' or '_' for emphasis, fence string for fence, etc.
method
markdown_it.tree.SyntaxTreeNode.meta() -> dict[Any, Any]A place for plugins to store an arbitrary data.
method
markdown_it.tree.SyntaxTreeNode.next_sibling() -> _NodeType | NoneGet the next node in the sequence of siblings.
method
markdown_it.tree.SyntaxTreeNode.pretty(*indent:int=2, *show_text:bool=False, *_current:int=0) -> strCreate an XML style string of the tree.
method
markdown_it.tree.SyntaxTreeNode.siblings() -> Sequence[_NodeType]Get siblings of the node.
method
markdown_it.tree.SyntaxTreeNode.tag() -> strhtml tag name, e.g.
method
markdown_it.tree.SyntaxTreeNode.to_tokens() -> list[Token]Recover the linear token stream.
method
markdown_it.tree.SyntaxTreeNode.type() -> strGet a string type of the represented syntax.
class
markdown_it.utils.OptionsTypeOptions for parsing.
class
markdown_it.utils.PresetTypePreset configuration for markdown-it.
About this data
These signatures were extracted from the public source of executablebooks/markdown-it-py
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.