Sha256: 9fd83899913dee5a431b1d00317112fe9ec157eda9703b5ef5bc6ea664660fe7
Contents?: true
Size: 828 Bytes
Versions: 6
Compression:
Stored size: 828 Bytes
Contents
module Coradoc module Parser module Asciidoc module Bibliography def bibliography (section_id.maybe >> str("[bibliography]\n") >> str("== ") >> match("[^\n]").repeat(1).as(:title) >> str("\n") >> bib_entry.repeat(1).as(:entries) ).as(:bibliography) end def bib_entry (match("^*") >> str(' [[[') >> match('[^,\[\]\n]').repeat(1).as(:anchor_name) >> ( str(",") >> match('[^\]\n]').repeat(1).as(:document_id) ).maybe >> str("]]]") >> (text_line.repeat(0,1) >> text_line.repeat(0) ).as(:ref_text).maybe >> line_ending.repeat(1).as(:line_break).maybe ).as(:bibliography_entry) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems