Reorganize GLFM input and output file contents
What does this MR do and why?
Related: Tracking Issue: Implement GLFM scripts per the ... (#361241 - closed)
Refactor/rename GLFM input and output files as discussed and agreed in this thread: #375300 (comment 1131831270).
-
Remove glfm_specification/input/gitlab_flavored_markdown/glfm_intro.txt. All content for the GLFM official specification will come fromglfm_specification/input/gitlab_flavored_markdown/glfm_official_specification.md -
Rename glfm_specification/outputtoglfm_specification/output_spec, andglfm_specification/example_snapshotstoglfm_specification/output_example_snapshots -
glfm_specification/output_spec/spec.txtandglfm_specification/output_spec/spec.htmlonly contain the contents ofglfm_specification/input/gitlab_flavored_markdown/glfm_official_specification.md. They will NO LONGER include the GitHub Flavored Markdown or CommonMark specs. -
Introduce glfm_specification/output_example_snapshots/snapshot_spec.mdandglfm_specification/output_example_snapshots/snapshot_spec.html, which are a complete set of all examples, generated fromglfm_specification/input/gitlab_flavored_markdown/glfm_official_specification.md,glfm_specification/input/gitlab_flavored_markdown/glfm_internal_extension.md, as well as the complete GitHub Flavored Markdown and CommonMark specs.- These
snapshot_spec.*files will contain only header sections which contain snapshot examples. All prose header sections which do not contain any examples will be omitted.
- These
-
Create/update all relevant documentation.
References
See the GLFM Specification Guide development documentation for much more context on all of this work: https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide
How to set up and validate locally
-
In a clean recently-rebased repo, run scripts/glfm/update-specification.rband ensure it works (i.e. there should be no changes to any files) -
In a clean recently-rebased repo, run scripts/glfm/update-example-snapshots.rband ensure it works (i.e. there should be no changes to any files) - [-] Verify that all
spec_example_positionnumbers fromglfm_specification/output_example_snapshots/examples_index.ymlmatch up to the correct corresponding example in https://github.github.com/gfm/. (NOTE: This is not possible because the GFM HTML is out of date. See internal slack thread with more context.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Chad Woolley