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

Function _convert_line

scripts/website/americanize_spelling.py:116–126  ·  view source on GitHub ↗
(line, counts)

Source from the content-addressed store, hash-verified

114
115
116def _convert_line(line, counts):
117 pieces = []
118 pos = 0
119 for mobj in _PROTECTED_RE.finditer(line):
120 if mobj.start() > pos:
121 pieces.append(_convert_text(line[pos:mobj.start()], counts))
122 pieces.append(mobj.group(0))
123 pos = mobj.end()
124 if pos < len(line):
125 pieces.append(_convert_text(line[pos:], counts))
126 return "".join(pieces)
127
128
129def convert_body(author_body_text, counts):

Callers 1

convert_bodyFunction · 0.85

Calls 6

_convert_textFunction · 0.85
startMethod · 0.65
appendMethod · 0.65
groupMethod · 0.65
endMethod · 0.65
joinMethod · 0.65

Tested by

no test coverage detected