MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / convert_body

Function convert_body

scripts/website/americanize_spelling.py:129–141  ·  view source on GitHub ↗
(author_body_text, counts)

Source from the content-addressed store, hash-verified

127
128
129def convert_body(author_body_text, counts):
130 out = []
131 in_fence = False
132 for line in author_body_text.split("\n"):
133 if _FENCE_RE.match(line):
134 in_fence = not in_fence
135 out.append(line)
136 continue
137 if in_fence or re.match(r"^ {4,}\S", line):
138 out.append(line)
139 continue
140 out.append(_convert_line(line, counts))
141 return "\n".join(out)
142
143
144def post_author(front_matter):

Callers 1

process_fileFunction · 0.85

Calls 5

_convert_lineFunction · 0.85
splitMethod · 0.65
appendMethod · 0.65
joinMethod · 0.65
matchMethod · 0.45

Tested by

no test coverage detected