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

Function sanitize_name

markdown/extensions/attr_list.py:106–111  ·  view source on GitHub ↗

Sanitize name as 'an XML Name, minus the `:`.' See .

(name: str)

Source from the content-addressed store, hash-verified

104
105
106def sanitize_name(name: str) -> str:
107 """
108 Sanitize name as 'an XML Name, minus the `:`.'
109 See <https://www.w3.org/TR/REC-xml-names/#NT-NCName>.
110 """
111 return NAME_RE.sub('_', name)
112
113
114class AttrListTreeprocessor(Treeprocessor):

Callers 3

attributeCallbackMethod · 0.90
sanitize_nameMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected