Module: Coradoc::Parser::Asciidoc::Term

Included in:
Base, Base
Defined in:
lib/coradoc/parser/asciidoc/term.rb

Instance Method Summary collapse

Instance Method Details

#termObject



9
10
11
12
13
# File 'lib/coradoc/parser/asciidoc/term.rb', line 9

def term
  term_type >> str(':[') >>
  match('[^\]]').repeat(1).as(:term) >>
  str("]") >> str("\n").repeat(1).as(:line_break)
end

#term2Object



15
16
17
18
19
# File 'lib/coradoc/parser/asciidoc/term.rb', line 15

def term2
  match('^\[') >> term_type >> str(']#') >>
  match('[^\#]').repeat(1).as(:term2) >> str('#') >>
  str("\n").repeat(1).as(:line_break)
end

#term_typeObject



5
6
7
# File 'lib/coradoc/parser/asciidoc/term.rb', line 5

def term_type
  (str("alt") | str("deprecated") | str("domain")).as(:term_type)
end