MCPcopy Create free account
hub / github.com/commonmark/cmark / output_char

Method output_char

test/normalize.py:108–120  ·  view source on GitHub ↗
(self, c, fallback)

Source from the content-addressed store, hash-verified

106 self.last = "ref"
107 # Helpers.
108 def output_char(self, c, fallback):
109 if c == '<':
110 self.output += "&lt;"
111 elif c == '>':
112 self.output += "&gt;"
113 elif c == '&':
114 self.output += "&amp;"
115 elif c == '"':
116 self.output += "&quot;"
117 elif c == None:
118 self.output += fallback
119 else:
120 self.output += c
121
122 def is_block_tag(self,tag):
123 return (tag in ['article', 'header', 'aside', 'hgroup', 'blockquote',

Callers 2

handle_entityrefMethod · 0.95
handle_charrefMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected