luplo.core.import_pipeline.codeblock_strip

Fenced-code-block stripper for luplo item bodies.

Removes ``` and ~~~ fenced blocks and replaces each with a single-line placeholder so the reader knows code existed at that location but isn’t duplicated into luplo (per project rule: code lives in git, not in items).

Functions

strip_fenced_blocks(→ str)

Replace each fenced block with [code: <lang or 'snippet'>] placeholder.

Module Contents

luplo.core.import_pipeline.codeblock_strip.strip_fenced_blocks(text: str) str

Replace each fenced block with [code: <lang or ‘snippet’>] placeholder.