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

Method detab

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

322 return fn_blocks
323
324 def detab(self, block: str) -> str:
325 """ Remove one level of indent from a block.
326
327 Preserve lazily indented blocks by only removing indent from indented lines.
328 """
329 lines = block.split('\n')
330 for i, line in enumerate(lines):
331 if line.startswith(' '*4):
332 lines[i] = line[4:]
333 return '\n'.join(lines)
334
335
336class 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