Class: PseudoHiki::BlockParser::BlockElement::VerbatimNode

Inherits:
Object
  • Object
show all
Defined in:
lib/pseudohiki/blockparser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#in_block_tagObject

Returns the value of attribute in_block_tag.



205
206
207
# File 'lib/pseudohiki/blockparser.rb', line 205

def in_block_tag
  @in_block_tag
end

Instance Method Details

#add_leaf(line, blockparser) ⇒ Object



207
208
209
210
211
212
# File 'lib/pseudohiki/blockparser.rb', line 207

def add_leaf(line, blockparser)
  return @stack.pop if VERBATIM_END.match? line
  return super(line, blockparser) unless @in_block_tag
  line = " #{line}" if BlockNodeEnd.head_re.match? line and not @in_block_tag
  @stack.push VerbatimLeaf.create(line, @in_block_tag)
end