module Asciidoctor::Substitutors

def sub_post_replacements text

Returns the converted String text

text - The String text to process

Public: Substitute post replacements
def sub_post_replacements text
  #if attr? 'hardbreaks-option', nil, true
  if @attributes['hardbreaks-option'] || @document.attributes['hardbreaks-option']
    lines = text.split LF, -1
    return text if lines.size < 2
    last = lines.pop
    (lines.map do |line|
      Inline.new(self, :break, (line.end_with? HARD_LINE_BREAK) ? (line.slice 0, line.length - 2) : line, type: :line).convert
    end << last).join LF
  elsif (text.include? PLUS) && (text.include? HARD_LINE_BREAK)
    text.gsub(HardLineBreakRx) { Inline.new(self, :break, $1, type: :line).convert }
  else
    text
  end
end