Method: Kramdown::Parser::Html::ElementConverter#strip_whitespace
- Defined in:
- lib/kramdown/parser/html.rb
#strip_whitespace(el) ⇒ Object
349 350 351 352 353 354 355 356 357 |
# File 'lib/kramdown/parser/html.rb', line 349 def strip_whitespace(el) return if el.children.empty? if el.children.first.type == :text el.children.first.value.lstrip! end if el.children.last.type == :text el.children.last.value.rstrip! end end |