Class: Stic::Metadata::BlockCommentYaml
- Defined in:
- lib/stic/metadata/block_comment_yaml.rb
Overview
The BlockCommentYaml front matter parses YAML meta data from an block comment at the beginning of a page.
Constant Summary collapse
- BLOCK_COMMENT_YAML_REGEXP =
%r{\A/\**\s*(?<data>.*?\n?)(\s*\*/\s*(\n|$)|^\s*\*/)(?<content>.*)\z}m
Constants inherited from Yaml
Instance Method Summary collapse
Methods inherited from Yaml
#match, #parse, #preprocess_content
Methods inherited from Parser
Instance Method Details
#preprocess_data(blob, data) ⇒ Object
28 29 30 |
# File 'lib/stic/metadata/block_comment_yaml.rb', line 28 def preprocess_data(blob, data) data.gsub(/^\s*\*/, "\n") end |
#regexp ⇒ Object
24 25 26 |
# File 'lib/stic/metadata/block_comment_yaml.rb', line 24 def regexp BLOCK_COMMENT_YAML_REGEXP end |