Add front-matter support to wiki pages
This adds wiki page front-matter parsing library code, behind a feature flag. The parser abstracts front-matter recognition and extraction and explanation of failure. The WikiPage model is provided with a new attribute `front_matter`, which is derived from the content. This attribute can be updated and serialized to the wiki-page repository. The feature flag is gated on a project-by-project basis. Front-matter parsing is unified across concerns, by re-using our existing front-matter parsing Regexp in the new front-matter parser, to ensure consistency. A new module, `Gitlab::WikiPages` is used by model and library code. `parse_string` is made a separate method so that different languages can be supported without modifying other code.
Showing
lib/gitlab/front_matter.rb
0 → 100644
lib/gitlab/wiki_pages.rb
0 → 100644
Please register or sign in to comment