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

Function _handle_word

markdown/extensions/attr_list.py:53–63  ·  view source on GitHub ↗
(s, t)

Source from the content-addressed store, hash-verified

51
52
53def _handle_word(s, t):
54 if t.startswith('.'):
55 return '.', t[1:]
56 if t.startswith('#'):
57 return 'id', t[1:]
58 # A word without a value is a valueless attribute. It is represented
59 # internally with a value of `None` so that what the user provided can
60 # be preserved. Consumers which assign the attribute to an element are
61 # responsible for restoring the historic `key="key"` representation
62 # for known boolean attributes (see `AttrListTreeprocessor.assign_attrs`).
63 return t, None
64
65
66_scanner = re.Scanner([

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected