squabble.util module

Odds and ends pieces that don’t fit elsewhere, but aren’t important enough to have their own modules.

squabble.util.strip_rst_directives(string)[source]

Strip reStructuredText directives out of a block of text.

Lines containing a directive will be stripped out entirely

>>> strip_rst_directives('hello\n.. code-block:: foo\nworld')
'hello\nworld'