MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / renderAttrs

Method renderAttrs

markdown_it/renderer.py:173–180  ·  view source on GitHub ↗

Render token attributes to string.

(token: Token)

Source from the content-addressed store, hash-verified

171
172 @staticmethod
173 def renderAttrs(token: Token) -> str:
174 """Render token attributes to string."""
175 result = ""
176
177 for key, value in token.attrItems():
178 result += " " + escapeHtml(key) + '="' + escapeHtml(str(value)) + '"'
179
180 return result
181
182 def renderInlineAsText(
183 self,

Callers 4

renderTokenMethod · 0.95
code_inlineMethod · 0.95
code_blockMethod · 0.95
fenceMethod · 0.95

Calls 2

escapeHtmlFunction · 0.85
attrItemsMethod · 0.80

Tested by

no test coverage detected