MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / detab

Method detab

markdown/extensions/footnotes.py:334–343  ·  view source on GitHub ↗

Remove one level of indent from a block. Preserve lazily indented blocks by only removing indent from indented lines.

(self, block: str)

Source from the content-addressed store, hash-verified

332 return fn_blocks
333
334 def detab(self, block: str) -> str:
335 """ Remove one level of indent from a block.
336
337 Preserve lazily indented blocks by only removing indent from indented lines.
338 """
339 lines = block.split('\n')
340 for i, line in enumerate(lines):
341 if line.startswith(' '*4):
342 lines[i] = line[4:]
343 return '\n'.join(lines)
344
345
346class FootnoteInlineProcessor(InlineProcessor):

Callers 5

runMethod · 0.95
detectTabbedMethod · 0.95
runMethod · 0.45
parse_contentMethod · 0.45
runMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected