MCPcopy
hub / github.com/Python-Markdown/markdown / detab

Method detab

markdown/extensions/footnotes.py:312–321  ·  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

310 return fn_blocks
311
312 def detab(self, block: str) -> str:
313 """ Remove one level of indent from a block.
314
315 Preserve lazily indented blocks by only removing indent from indented lines.
316 """
317 lines = block.split('\n')
318 for i, line in enumerate(lines):
319 if line.startswith(' '*4):
320 lines[i] = line[4:]
321 return '\n'.join(lines)
322
323
324class 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