pidgy.util
¶
Module Contents¶
-
class
pidgy.util.
ContextDepth
[source]¶ Count the current depth of a context manager invocation.
-
depth
= 0¶
-
-
pidgy.util.
WHITESPACE
¶
-
pidgy.util.
num_first_indent
(text: str) → int[source]¶ The number of indents for the first blank line.
-
pidgy.util.
base_indent
(tokens: typing.List[dict]) → int[source]¶ Peek into mistune tokens and find the last code indent.
-
pidgy.util.
whiten
(text: str) → str[source]¶ whiten strips empty lines because the markdown.BlockLexer doesn’t like that.
-
pidgy.util.
strip_front_matter
(text: str, sep=None) → str[source]¶ Remove yaml front matter froma string.
-
pidgy.util.
yield_files
(files: typing.Sequence[str], recursive=False) → typing.Generator[source]¶ Return a list of files from a collection of files and globs.
-
pidgy.util.
strip_front_matter
(text: str, sep=None) → str[source] Remove yaml front matter froma string.