Skip to main content

Module marked_block

Module marked_block 

Source

Functions§

contains_marker_line
True when content carries marker as a whole (trimmed) line — the only form the writers emit. Use instead of content.contains(marker) wherever “this file has the block” is meant.
remove_content
remove_from_file
replace_marked_block
Replace the region between start and end markers with replacement (trim-aware newlines). If markers are missing or invalid, returns content unchanged.
upsert