Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Python-Markdown/markdown
/ functions
Functions
1,263 in github.com/Python-Markdown/markdown
⨍
Functions
1,263
◇
Types & classes
191
↳
Endpoints
1
↓ 672 callers
Method
assertMarkdownRenders
Test that source Markdown text renders to expected output with given keywords. `expected_attrs` accepts a `dict`. Each key should be
markdown/test_tools.py:61
↓ 356 callers
Method
dedent
Dedent text.
markdown/test_tools.py:81
↓ 43 callers
Method
register
Add an item to the registry with the given name and priority. Arguments: item: The item being registered. na
markdown/util.py:365
↓ 28 callers
Method
set
Set a new state.
markdown/blockparser.py:59
↓ 21 callers
Method
assertOutputEquals
Test that source code block results in the expected output with given options.
tests/test_syntax/extensions/test_code_hilite.py:49
↓ 21 callers
Method
convert
Convert a Markdown string to a string in the specified output format. Arguments: source: Markdown formatted text as Unic
markdown/core.py:315
↓ 16 callers
Function
parse_options
Define and parse `optparse` options for command-line usage.
markdown/__main__.py:45
↓ 14 callers
Method
getConfig
Return a single configuration option value. Arguments: key: The configuration option name. default: Default
markdown/extensions/__init__.py:60
↓ 13 callers
Method
store
Saves an HTML segment for later reinsertion. Returns a placeholder string that needs to be inserted into the document.
markdown/util.py:229
↓ 12 callers
Function
strip_tags
Strip HTML tags and return plain text. Note: HTML entities are unaffected.
markdown/extensions/toc.py:105
↓ 11 callers
Method
parseBlocks
Process blocks of Markdown text and attach to given `etree` node. Given a list of `blocks`, each `blockprocessor` is stepped through
markdown/blockparser.py:138
↓ 11 callers
Method
reset
Resets all state variables to prepare the parser instance for new input. Called once upon creation of a class instance. Should be ca
markdown/core.py:263
↓ 10 callers
Method
getConfigs
Return all configuration options. Returns: All configuration options.
markdown/extensions/__init__.py:76
↓ 9 callers
Method
unescape
Return unescaped text given text with an inline placeholder.
markdown/inlinepatterns.py:264
↓ 8 callers
Method
at_line_start
Returns True if current position is at start of line. Allows for up to three blank spaces at start of line.
markdown/htmlparser.py:181
↓ 8 callers
Method
handle_empty_tag
Handle empty tags (`<data>`).
markdown/htmlparser.py:265
↓ 8 callers
Method
lastChild
Return the last child of an `etree` element.
markdown/blockprocessors.py:78
↓ 8 callers
Method
registerExtension
Register an extension as having a resettable state. Arguments: extension: An instance of the extension to register.
markdown/core.py:248
↓ 7 callers
Method
handle_data
(self, data: str)
markdown/htmlparser.py:257
↓ 7 callers
Method
is_block_level
Check if the given `tag` is a block level HTML tag. Returns `True` for any string listed in `Markdown.block_level_elements`. A `tag`
markdown/core.py:302
↓ 7 callers
Method
run
(self, root: etree.Element)
tests/test_syntax/extensions/test_code_hilite.py:783
↓ 6 callers
Method
get_separator
Get the footnote separator.
markdown/extensions/footnotes.py:186
↓ 6 callers
Method
parseChunk
Parse a chunk of Markdown text and attach to given `etree` node. While the `text` argument is generally assumed to contain multiple
markdown/blockparser.py:120
↓ 5 callers
Method
detab
Remove one level of indent from a block. Preserve lazily indented blocks by only removing indent from indented lines.
markdown/extensions/footnotes.py:324
↓ 5 callers
Method
handle_data
(self, data)
markdown/extensions/md_in_html.py:251
↓ 5 callers
Method
isstate
Test that top (current) level is of given state.
markdown/blockparser.py:67
↓ 5 callers
Method
prettify
(self, xml)
tests/test_apis.py:468
↓ 4 callers
Method
create_config_file
Helper to create temporary configuration files.
tests/test_apis.py:838
↓ 4 callers
Method
get_placeholder
(self, key: int)
markdown/util.py:252
↓ 4 callers
Method
get_starttag_text
Return full source of start tag: `<...>`.
markdown/htmlparser.py:364
↓ 4 callers
Function
parseBoolValue
Parses a string representing a boolean value. If parsing was successful, returns `True` or `False`. If `preserve_none=True`, returns `True`, `F
markdown/util.py:139
↓ 4 callers
Method
setConfig
Set a configuration option. If the corresponding default value set in [`config`][markdown.extensions.Extension.config] is a
markdown/extensions/__init__.py:94
↓ 3 callers
Method
__init__
(self, parser: BlockParser)
markdown/blockprocessors.py:74
↓ 3 callers
Method
__init__
Create an instant of an inline pattern. Arguments: pattern: A regular expression that matches a pattern. md:
markdown/inlinepatterns.py:226
↓ 3 callers
Method
__init__
Initiate Extension and set up configs.
markdown/extensions/abbr.py:42
↓ 3 callers
Function
_raise_serialization_error
(text: str)
markdown/serializers.py:58
↓ 3 callers
Method
_sort
Sort the registry by priority from highest to lowest. This method is called internally and should never be explicitly called.
markdown/util.py:405
↓ 3 callers
Method
getText
Parse the content between `[]` of the start of an image or link resolving nested square brackets.
markdown/inlinepatterns.py:832
↓ 3 callers
Function
get_attrs_and_remainder
Parse attribute list and return a list of attribute tuples. Additionally, return any text that remained after a curly brace. In typical cases, i
markdown/extensions/attr_list.py:69
↓ 3 callers
Method
get_index_for_name
Return the index of the given name.
markdown/util.py:354
↓ 3 callers
Method
hilite
Pass code to the [Pygments](https://pygments.org/) highlighter with optional line numbers. The output should then be styled with CSS
markdown/extensions/codehilite.py:135
↓ 3 callers
Function
parse_hl_lines
Support our syntax for emphasizing certain lines of code. `expr` should be like '1 2' to emphasize lines 1 and 2 of a code block. Returns a l
markdown/extensions/codehilite.py:42
↓ 3 callers
Method
parse_sub_patterns
Parses sub patterns. `data`: text to evaluate. `parent`: Parent to attach text and sub elements to. `last`: Last a
markdown/inlinepatterns.py:589
↓ 2 callers
Method
__handleInline
Process string with inline patterns and replace it with placeholders. Arguments: data: A line of Markdown text.
markdown/treeprocessors.py:120
↓ 2 callers
Method
__init__
Setup configs.
markdown/extensions/footnotes.py:42
↓ 2 callers
Method
__processPlaceholders
Process string with placeholders and generate `ElementTree` tree. Arguments: data: String with placeholders instead of `
markdown/treeprocessors.py:172
↓ 2 callers
Function
_deprecated
(obj: Class | Function)
scripts/griffe_extensions.py:15
↓ 2 callers
Function
_escape_attrib_html
(text: str)
markdown/serializers.py:101
↓ 2 callers
Function
_get_version
Returns a PEP 440-compliant version number from `version_info`.
markdown/__meta__.py:34
↓ 2 callers
Method
_insert_message
(self, obj: Function | Class, message: str)
scripts/griffe_extensions.py:25
↓ 2 callers
Method
_split_row
split a row of text into list of cells.
markdown/extensions/tables.py:147
↓ 2 callers
Function
_write_html
(root: Element, format: Literal["html", "xhtml"] = "html")
markdown/serializers.py:175
↓ 2 callers
Method
build_element
Element builder.
markdown/inlinepatterns.py:650
↓ 2 callers
Method
close
Handle any buffered data.
markdown/htmlparser.py:153
↓ 2 callers
Method
close
Handle any buffered data.
markdown/extensions/md_in_html.py:67
↓ 2 callers
Method
deregister
Remove an item from the registry. Set `strict=False` to fail silently. Otherwise a [`ValueError`][] is raised for an unknown `name`.
markdown/util.py:391
↓ 2 callers
Method
getLink
Parse data between `()` of `[Text]()` allowing recursive `()`.
markdown/inlinepatterns.py:716
↓ 2 callers
Method
get_endtag_text
Returns the text of the end tag. If it fails to extract the actual text from the raw data, it builds a closing tag with `tag`.
markdown/htmlparser.py:194
↓ 2 callers
Method
handle_empty_tag
(self, data, is_block)
markdown/extensions/md_in_html.py:260
↓ 2 callers
Method
handle_endtag
(self, tag)
markdown/extensions/md_in_html.py:151
↓ 2 callers
Method
handle_startendtag
(self, tag: str, attrs)
markdown/htmlparser.py:288
↓ 2 callers
Function
isString
Return `True` if object is a string but not an [`AtomicString`][markdown.util.AtomicString].
markdown/treeprocessors.py:48
↓ 2 callers
Method
load_glossary
Adds `dictionary` to our glossary. Any abbreviations that already exist will be overwritten.
markdown/extensions/abbr.py:66
↓ 2 callers
Method
looseDetab
Remove a tab from front of lines but allowing dedented lines.
markdown/blockprocessors.py:100
↓ 2 callers
Method
makeFootnoteId
Return footnote link id.
markdown/extensions/footnotes.py:190
↓ 2 callers
Method
makeFootnoteRefId
Return footnote back-link id.
markdown/extensions/footnotes.py:197
↓ 2 callers
Method
parseDocument
Parse a Markdown document into an `ElementTree`. Given a list of lines, an `ElementTree` object (not just a parent `Element`) is cre
markdown/blockparser.py:100
↓ 2 callers
Method
parse_bogus_comment
(self, i: int, report: int = 0)
markdown/htmlparser.py:349
↓ 2 callers
Method
parse_content
Get sibling admonition. Retrieve the appropriate sibling element. This can get tricky when dealing with lists.
markdown/extensions/admonition.py:73
↓ 2 callers
Method
registerExtensions
Load a list of extensions into an instance of the `Markdown` class. Arguments: extensions (list[Extension | str]): A lis
markdown/core.py:159
↓ 2 callers
Method
reset
(self)
markdown/extensions/toc.py:490
↓ 2 callers
Method
run
Each subclass of `Preprocessor` should override the `run` method, which takes the document as a list of strings split by newlines and
markdown/preprocessors.py:56
↓ 2 callers
Method
run
(self, doc: etree.Element)
markdown/extensions/toc.py:365
↓ 2 callers
Function
run_postprocessors
Run postprocessors from Markdown instance on text.
markdown/extensions/toc.py:131
↓ 2 callers
Method
stash_to_string
Convert a stashed object to a string.
markdown/postprocessors.py:105
↓ 2 callers
Function
unescape
Unescape Markdown backslash escaped text.
markdown/extensions/toc.py:99
↓ 2 callers
Method
unescape
Return unescaped text given text with an inline placeholder.
markdown/inlinepatterns.py:511
↓ 2 callers
Method
unescape
(self, text: str)
markdown/treeprocessors.py:462
↓ 2 callers
Function
unique
Ensure id is unique in set of ids. Append '_1', '_2'... if not
markdown/extensions/toc.py:56
↓ 1 callers
Method
__applyPattern
Check if the line fits the pattern, create the necessary elements, add it to `stashed_nodes`. Arguments: data: T
markdown/treeprocessors.py:253
↓ 1 callers
Method
__build_ancestors
Build the ancestor list.
markdown/treeprocessors.py:333
↓ 1 callers
Method
__findPlaceholder
Extract id from data string, start from index. Arguments: data: String. index: Index, from which we start se
markdown/treeprocessors.py:96
↓ 1 callers
Method
__init__
(self, **kwargs)
markdown/extensions/fenced_code.py:39
↓ 1 callers
Method
__init__
(self, parser: blockparser.BlockParser)
markdown/extensions/sane_lists.py:41
↓ 1 callers
Method
__init__
(self, **kwargs)
markdown/extensions/toc.py:423
↓ 1 callers
Method
__init__
(self, parser: blockparser.BlockParser, config: dict[str, Any])
markdown/extensions/tables.py:44
↓ 1 callers
Method
__init__
(self, **kwargs)
markdown/extensions/smarty.py:183
↓ 1 callers
Method
__init__
(self, **kwargs)
markdown/extensions/wikilinks.py:40
↓ 1 callers
Method
__makePlaceholder
Generate a placeholder
markdown/treeprocessors.py:90
↓ 1 callers
Method
__processElementText
Process placeholders in `Element.text` or `Element.tail` of Elements popped from `self.stashed_nodes`. Arguments:
markdown/treeprocessors.py:143
↓ 1 callers
Method
__stashNode
Add node to stash.
markdown/treeprocessors.py:114
↓ 1 callers
Method
_addPatterns
( self, md: Markdown, patterns: Sequence[tuple[str, Sequence[int | str | etree.Element
markdown/extensions/smarty.py:196
↓ 1 callers
Method
_build_empty_row
Build an empty row.
markdown/extensions/tables.py:118
↓ 1 callers
Method
_build_row
Given a row of text, build table cells.
markdown/extensions/tables.py:126
↓ 1 callers
Method
_escape
basic html escaping
markdown/extensions/fenced_code.py:191
↓ 1 callers
Function
_escape_attrib
(text: str)
markdown/serializers.py:82
↓ 1 callers
Function
_escape_cdata
(text)
markdown/serializers.py:64
↓ 1 callers
Method
_getMeta
Return meta data or `config` data.
markdown/extensions/wikilinks.py:89
↓ 1 callers
Function
_get_stack_depth
Get current stack depth, performantly.
markdown/util.py:169
↓ 1 callers
Function
_normalize_whitespace
Normalize whitespace for a string of HTML using `tidylib`.
markdown/test_tools.py:129
next →
1–100 of 1,263, ranked by callers