in reply to HTML::Element and "<br>" tags
I haven't looked at how as_text strips or converts elements, but a simple solution is to: before calling that method, replace every br element with a text node containing just a space (or whatever is visually suitable). That might require walking the entire tree, unless TreeBuilder lets you hook into it with a callback or something.