Class: Slaw::Grammars::Inlines::InlineItem

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/slaw/grammars/inlines_nodes.rb

Instance Method Summary collapse

Instance Method Details

#to_xml(b, idprefix) ⇒ Object



39
40
41
42
43
44
45
46
# File 'lib/slaw/grammars/inlines_nodes.rb', line 39

def to_xml(b, idprefix)
  if text_value.start_with? '\\'
    # handle escaped characters: \a -> a
    b.text(text_value[1..])
  else
    b.text(text_value)
  end
end