Fix extraneous paragraphs when parsing text for API docs.
Review Request #8771 — Created Feb. 20, 2017 and submitted — Latest diff uploaded
When feeding a multi-line string to
parse_text()
, the resulting nodes
were a paragraph of paragraphs, which doesn't properly convert to HTML.
It ends up resulting in some extra blank paragraphs, messing with
spacing.This changes
parse_text()
to default to returning the child elements
that were created, rather than the containing node. For those uses where
we do want a containing node returned, we can still do so, but it's now
optional.This fixes some odd spacing issues I've noticed for a while in our API
docs in field descriptions.
Browsed through the docs. Paragraphs were still intact, as were the
nodes that needed the specific wrapping element. Field definitions that
had extra empty paragraphs were fixed.