autoclasstoc.utils.strip_p

autoclasstoc.utils.strip_p(nodes)[source]

Remove any top-level paragraph nodes.

Parsing a simple string like “Hello world” with nodes_from_rst will return text wrapped in a paragraph. If this paragraph is not desired (e.g. because it messes with formatting), this function can be used to get rid of it.