MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / extendMarkdown

Method extendMarkdown

markdown/extensions/nl2br.py:35–45  ·  view source on GitHub ↗

Register the processor. | Class Instance | Registry | Name | Priority | | --------------------------------------------------------------- | --------------------------------------

(self, md)

Source from the content-addressed store, hash-verified

33 """ Newline-to-break extension for Python-Markdown. """
34
35 def extendMarkdown(self, md):
36 """ Register the processor.
37
38 | Class Instance | Registry | Name | Priority |
39 | --------------------------------------------------------------- | ------------------------------------------------------------- | ------ | :------: |
40 | [`SubstituteTagInlineProcessor`][markdown.inlinepatterns.SubstituteTagInlineProcessor] | [`inlinepatterns`][markdown.inlinepatterns.build_inlinepatterns] | `nl` | `5` |
41
42 """
43 # flake8: noqa: E501 38-40
44 br_tag = SubstituteTagInlineProcessor(BR_RE, 'br')
45 md.inlinePatterns.register(br_tag, 'nl', 5)
46
47
48def makeExtension(**kwargs): # pragma: no cover

Callers

nothing calls this directly

Calls 2

registerMethod · 0.80

Tested by

no test coverage detected