class PrawnHtml::DocumentRenderer
def prepare_text(content)
def prepare_text(content) text = @before_content.any? ? ::Oga::HTML::Entities.decode(@before_content.join) : '' @before_content.clear return (@last_text = text + content) if context.white_space_pre? content = content.lstrip if @last_text[-1] == ' ' || @last_tag_open text += content.tr("\n", ' ').squeeze(' ') @last_text = text end