class PrawnHtml::DocumentRenderer
def on_text_node(content)
-
(NilClass)
- nil value (=> no element)
Parameters:
-
content
(String
) -- the text node content
def on_text_node(content) if context.last.respond_to?(:on_text_node) # Avoid geting text from table rendered before it. context.last.on_text_node(content) return end return if context.previous_tag&.block? && content.match?(/\A\s*\Z/) text = prepare_text(content) buffer << context.merged_styles.merge(text: text) unless text.empty? context.last_text_node = true nil end