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

Function positioningHeadlines

tools/scripts/updateDocumentToC.py:177–189  ·  view source on GitHub ↗

Strips unnecessary whitespaces/tabs if first header is not left-aligned

(headlines)

Source from the content-addressed store, hash-verified

175 return out_contents, headlines
176
177def positioningHeadlines(headlines):
178 """
179 Strips unnecessary whitespaces/tabs if first header is not left-aligned
180 """
181 left_just = False
182 for row in headlines:
183 if row[-1] == 1:
184 left_just = True
185 break
186 if not left_just:
187 for row in headlines:
188 row[-1] -= 1
189 return headlines
190
191def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
192 """

Callers 1

markdownToclifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected