Class: Metanorma::Standoc::Datamodel::AttributesTablePreprocessor

Inherits:
Asciidoctor::Extensions::Preprocessor
  • Object
show all
Defined in:
lib/metanorma/standoc/datamodel/attributes_table_preprocessor.rb

Constant Summary collapse

BLOCK_START_REGEXP =
/\{(.+?)\.\*,(.+),(.+)\}/
BLOCK_END_REGEXP =
/\A\{[A-Z]+\}\z/
MARCO_REGEXP =
/\[datamodel_attributes_table,([^,]+),?(.+)?\]/
TEMPLATES_PATH =
File.expand_path("../views/datamodel", __dir__).freeze

Instance Method Summary collapse

Instance Method Details

#process(document, reader) ⇒ Object

search document for block ‘datamodel_attributes_table`

read include derectives that goes after that in block and transform
into yaml2text blocks


16
17
18
19
# File 'lib/metanorma/standoc/datamodel/attributes_table_preprocessor.rb', line 16

def process(document, reader)
  input_lines = reader.lines.to_enum
  Asciidoctor::PreprocessorReader.new(document, processed_lines(document, input_lines))
end