sdkagent

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

KindCount
Classes7
Functions18
Methods26

API list

funcmarkdown_it.cli.parse.convert_file(filename:str) -> None
Parse a Markdown file and dump the output to stdout.
funcmarkdown_it.cli.parse.convert_stdin() -> None
Parse a Markdown file and dump the output to stdout.
funcmarkdown_it.cli.parse.interactive() -> None
Parse user input, dump to stdout, rinse and repeat.
funcmarkdown_it.cli.parse.parse_args(args:Sequence[str] | None) -> argparse.Namespace
Parse input CLI arguments.
funcmarkdown_it.common.normalize_url.normalizeLinkText(url:str) -> str
Normalize autolink content :: <destination> ~~~~~~~~~~~
funcmarkdown_it.common.normalize_url.validateLink(url:str, validator:Callable[[str], bool] | None=None) -> bool
Validate URL link is allowed in output.
funcmarkdown_it.common.utils.fromCodePoint(c:int) -> str
Convert ordinal to unicode.
funcmarkdown_it.common.utils.isMdAsciiPunct(ch:int) -> bool
Markdown ASCII punctuation characters.
funcmarkdown_it.common.utils.isPunctChar(ch:str) -> bool
Check if character is a punctuation character.
funcmarkdown_it.common.utils.isSpace(code:int | None) -> bool
Check if character code is a whitespace.
funcmarkdown_it.common.utils.isStrSpace(ch:str | None) -> bool
Check if character is a whitespace.
funcmarkdown_it.common.utils.isWhiteSpace(code:int) -> bool
Zs (unicode class) || [\t\f\v\r\n]
funcmarkdown_it.common.utils.normalizeReference(string:str) -> str
Helper to unify [reference labels].
funcmarkdown_it.common.utils.stripEscape(string:str) -> str
Strip escape \ characters
classmarkdown_it.parser_block.ParserBlock
ParserBlock#ruler -> Ruler [[Ruler]] instance.
methodmarkdown_it.parser_block.ParserBlock.tokenize(state:StateBlock, startLine:int, endLine:int) -> None
Generate tokens for input range.
classmarkdown_it.presets.gfm_like
GitHub Flavoured Markdown (GFM) like.
classmarkdown_it.presets.gfm_like2
GitHub Flavoured Markdown (GFM) like, extended.
classmarkdown_it.renderer.RendererHTML
Contains render rules for tokens.
methodmarkdown_it.renderer.RendererHTML.render(tokens:Sequence[Token], options:OptionsDict, env:EnvType) -> str
Takes token stream and generates HTML.
methodmarkdown_it.renderer.RendererHTML.renderAttrs(token:Token) -> str
Render token attributes to string.
methodmarkdown_it.renderer.RendererHTML.renderToken(tokens:Sequence[Token], idx:int, options:OptionsDict, env:EnvType) -> str
Default token renderer.
funcmarkdown_it.rules_core.inline.inline(state:StateCore) -> None
Parse inlines
funcmarkdown_it.rules_core.linkify.linkify(state:StateCore) -> None
Rule for identifying plain-text links.
funcmarkdown_it.rules_inline.escape.escape(state:StateInline, silent:bool) -> bool
Process escaped chars and hardbreaks.
funcmarkdown_it.rules_inline.linkify.linkify(state:StateInline, silent:bool) -> bool
Rule for identifying plain-text links.
methodmarkdown_it.token.Token.attrItems() -> list[tuple[str, str | int | float]]
Get (key, value) list of attrs.
methodmarkdown_it.token.Token.attrJoin(name:str, value:str) -> None
Join value to existing attribute via space.
methodmarkdown_it.token.Token.attrPush(attrData:tuple[str, str | int | float]) -> None
Add `[ name, value ]` attribute to list.
methodmarkdown_it.token.Token.attrSet(name:str, value:str | int | float) -> None
Set `name` attribute to `value`.
methodmarkdown_it.token.Token.copy(**changes:Any) -> Token
Return a shallow copy of the instance.
methodmarkdown_it.token.Token.from_dict(dct:MutableMapping[str, Any]) -> Token
Convert a dict to a Token.
classmarkdown_it.tree.SyntaxTreeNode
A Markdown syntax tree node.
methodmarkdown_it.tree.SyntaxTreeNode.attrs() -> dict[str, str | int | float]
Html attributes.
methodmarkdown_it.tree.SyntaxTreeNode.block() -> bool
True for block-level tokens, false for inline tokens.
methodmarkdown_it.tree.SyntaxTreeNode.hidden() -> bool
If it's true, ignore this element when rendering.
methodmarkdown_it.tree.SyntaxTreeNode.info() -> str
fence infostring
methodmarkdown_it.tree.SyntaxTreeNode.is_nested() -> bool
Is this node nested?.
methodmarkdown_it.tree.SyntaxTreeNode.is_root() -> bool
Is the node a special root node?
methodmarkdown_it.tree.SyntaxTreeNode.level() -> int
nesting level, the same as `state.level`
methodmarkdown_it.tree.SyntaxTreeNode.map() -> tuple[int, int] | None
Source map info.
methodmarkdown_it.tree.SyntaxTreeNode.markup() -> str
'*' or '_' for emphasis, fence string for fence, etc.
methodmarkdown_it.tree.SyntaxTreeNode.meta() -> dict[Any, Any]
A place for plugins to store an arbitrary data.
methodmarkdown_it.tree.SyntaxTreeNode.next_sibling() -> _NodeType | None
Get the next node in the sequence of siblings.
methodmarkdown_it.tree.SyntaxTreeNode.pretty(*indent:int=2, *show_text:bool=False, *_current:int=0) -> str
Create an XML style string of the tree.
methodmarkdown_it.tree.SyntaxTreeNode.siblings() -> Sequence[_NodeType]
Get siblings of the node.
methodmarkdown_it.tree.SyntaxTreeNode.tag() -> str
html tag name, e.g.
methodmarkdown_it.tree.SyntaxTreeNode.to_tokens() -> list[Token]
Recover the linear token stream.
methodmarkdown_it.tree.SyntaxTreeNode.type() -> str
Get a string type of the represented syntax.
classmarkdown_it.utils.OptionsType
Options for parsing.
classmarkdown_it.utils.PresetType
Preset 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.

Back to all 805 libraries