Skip to main content

Module indent_block

Module indent_block 

Source
Expand description

Strip common leading indentation from a captured block (GitHub issue #69).

Used for {name:blk} after the same regex boundaries as :ml. Blank lines and lines that contain only spaces or tabs do not contribute to the computed margin. Tabs count as single characters (not expanded). Output lines are joined with \\n.

Functionsยง

strip_common_indent
Remove the largest common prefix of spaces/tabs from each line (see module docs).