MCPcopy Create free account
hub / github.com/catchorg/Catch2 / removeLines

Function removeLines

tools/scripts/updateDocumentToC.py:47–58  ·  view source on GitHub ↗

Removes existing [back to top] links and tags.

(lines, remove=('[[back to top]', '<a class="mk-toclify"'))

Source from the content-addressed store, hash-verified

45 return in_contents
46
47def removeLines(lines, remove=('[[back to top]', '<a class="mk-toclify"')):
48 """Removes existing [back to top] links and <a id> tags."""
49
50 if not remove:
51 return lines[:]
52
53 out = []
54 for l in lines:
55 if l.startswith(remove):
56 continue
57 out.append(l)
58 return out
59
60def removeToC(lines):
61 """Removes existing table of contents starting at index contentLineNdx."""

Callers 1

markdownToclifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected