Class: PointBlank::Parsing::ParagraphUnderlineOverlay

Inherits:
NullOverlay show all
Defined in:
lib/mmmd/blankshell.rb

Overview

Overlay for processing underline classes of paragraph

Instance Method Summary collapse

Methods inherited from NullOverlay

begin?

Methods inherited from NullParser

begin?, #close, #consume, #initialize, #parsed_content

Constructor Details

This class inherits a constructor from PointBlank::Parsing::NullParser

Instance Method Details

#process(block, lazy: false) ⇒ nil, Class

Process block after it closed

Parameters:

Returns:

  • (nil, Class)


818
819
820
821
822
# File 'lib/mmmd/blankshell.rb', line 818

def process(block, lazy: false)
  output = check_underlines(block.content.lines.last, lazy)
  block.content = block.content.lines[0..-2].join("") if output
  output
end