MCPcopy
hub / github.com/Python-Markdown/markdown / _normalize_whitespace

Function _normalize_whitespace

markdown/test_tools.py:129–143  ·  view source on GitHub ↗

Normalize whitespace for a string of HTML using `tidylib`.

(text)

Source from the content-addressed store, hash-verified

127
128
129def _normalize_whitespace(text):
130 """ Normalize whitespace for a string of HTML using `tidylib`. """
131 output, errors = tidylib.tidy_fragment(text, options={
132 'drop_empty_paras': 0,
133 'fix_backslash': 0,
134 'fix_bad_comments': 0,
135 'fix_uri': 0,
136 'join_styles': 0,
137 'lower_literals': 0,
138 'merge_divs': 0,
139 'output_xhtml': 1,
140 'quote_ampersand': 0,
141 'newline': 'LF'
142 })
143 return output
144
145
146class LegacyTestMeta(type):

Callers 1

testMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…