And a cleaner solution than the dedicated block_separator argument I previously suggested is just to simply apply the default separator to block elements only:
Also, the prettify() method could also support block_elements, which would only indent elements in that list. The default for the block_elements would be True, to maintain compatibility. That would be pretty cool.
I guess we would also need a block_elements argument to know which elements are block versus inline:
p.get_text( block_separator =' ', block_elements = ['article', 'blockquote', ..., 'ul'])
And a cleaner solution than the dedicated block_separator argument I previously suggested is just to simply apply the default separator to block elements only:
p.get_text(' ', block_elements = ['article', 'blockquote', ..., 'ul'])
Also, the prettify() method could also support block_elements, which would only indent elements in that list. The default for the block_elements would be True, to maintain compatibility. That would be pretty cool.