Redesign Golden Master spec to be markdown-driven like CommonMark and GitHub Flavored Markdown
The following discussion from !68671 (merged) should be addressed:
-
@digitalmoksha started a discussion: (+2 comments) While I know the main thrust of this MR is to validate against our GFM.
But it might also be worth eventually validating the frontend against the CommonMark Spec itself. Their specification is also their test file: https://github.com/commonmark/commonmark-spec/blob/master/spec.txt.
Just wanted to mention if this hadn't been seen before. And the GitHub Flavored Markdown spec is here: https://github.com/github/cmark-gfm/blob/master/test/spec.txt
Chad Woolley @cwoolley-gitlab
Great ideas. I wish I had seen these examples sooner. I definitely think in the future we should iterate towards this sort of executable documentation + spec approach. I've left some more detailed thoughts in the comments above:
CommonMark examples
- specification source: https://github.com/commonmark/commonmark-spec/blob/master/spec.txt
- rendered specification: https://spec.commonmark.org/0.30/
- test: https://github.com/commonmark/commonmark-spec/blob/master/test/spec_tests.py
GitHub-flavored Markdown examples
- specification source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt
- rendered specification: https://github.github.com/gfm/
- test: https://github.com/commonmark/commonmark-spec/blob/master/test/spec_tests.py
GitLab-flavored Markdown examples
- specification source: https://gitlab.com/gitlab-org/gitlab/blob/master/spec/fixtures/markdown.md.erb
- rendered specification: Not available, it is only rendered for for use in the feature spec
- tests:
- feature spec: https://gitlab.com/gitlab-org/gitlab/blob/master/spec/features/markdown/markdown_spec.rb
- feature spec: https://gitlab.com/gitlab-org/gitlab/blob/master/spec/features/markdown/copy_as_gfm_spec.rb
- golden master / characterization spec: in progress, see !68671 (merged)
TODO: Revisit discussion on how to specify api_context
See the discussion in this thread about where we should best specify api_context
: !68671 (comment 732333651)