Module: Markita::Markdown::Fold

Defined in:
lib/markita/markdown/fold.rb

Overview

Module to isolate from Markdown :reek:DuplicateMethodCall

Constant Summary collapse

RGX =
/^[-.]{3} #/
METADATA =
/^(\w+): (.*)$/

Class Method Summary collapse

Class Method Details

.scrape4metadata(line, metadata, attributes) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/markita/markdown/fold.rb', line 13

def self.(line, , attributes)
  if (md = Fold::.match(line))
    if (key = md[1]) == 'attributes'
      attributes.push " #{md[2]}"
    else
      [key] = md[2]
    end
  end
end