diff --git a/doc/development/gitlab_flavored_markdown/specification_guide/index.md b/doc/development/gitlab_flavored_markdown/specification_guide/index.md index 959e5e53ce92bc8c377e8744c26b481b17ce1f69..f2d813cb993f887a00ca9b3af17a1d863ce6a839 100644 --- a/doc/development/gitlab_flavored_markdown/specification_guide/index.md +++ b/doc/development/gitlab_flavored_markdown/specification_guide/index.md @@ -653,6 +653,10 @@ is the manually updated canonical Markdown+HTML examples for GLFM extensions. - It contains examples in the [standard backtick-delimited `spec.txt` format](#various-markdown-specifications), each of which contain a Markdown example and the corresponding canonical HTML. +- For all GitLab examples, the "extension" annotation after the backticks should consist of only + `example gitlab`. It does not currently include any additional extension annotations describing + the specific Markdown, unlike the GitHub Flavored Markdown examples, which do include + these additional annotations (such as `example strikethrough`). - The `update-specification.rb` script inserts it as new sections before the appendix of generated `spec.txt`. - It should consist of `H1` header sections, with all examples nested either 2 or 3 levels deep @@ -672,7 +676,7 @@ The actual file should not have these prefixed `|` characters. | |## Strong but with two asterisks | -|```````````````````````````````` example +|```````````````````````````````` example gitlab |**bold** |. |<p><strong>bold</strong></p> @@ -682,7 +686,7 @@ The actual file should not have these prefixed `|` characters. | |## Strong but with HTML | -|```````````````````````````````` example +|```````````````````````````````` example gitlab |<strong> |bold |</strong> diff --git a/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt b/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt index 332b311dff294309cf3271b9d1d4a534a57b1885..3fa59a9f7b1f016443f8bf1aebd204803694b8c4 100644 --- a/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt +++ b/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt @@ -13,7 +13,7 @@ examples may be split into multiple top-level headings in the future. See [the footnotes section of the user-facing documentation for GitLab Flavored Markdown](https://docs.gitlab.com/ee/user/markdown.html#footnotes). -```````````````````````````````` example gitlab footnote +```````````````````````````````` example gitlab footnote reference tag [^fortytwo] [^fortytwo]: footnote text @@ -55,7 +55,7 @@ The following are some basic examples; more examples may be added in the future. Incomplete task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [ ] incomplete . <ul> @@ -69,7 +69,7 @@ incomplete Completed task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [x] completed . <ul> @@ -83,7 +83,7 @@ completed Inapplicable task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [~] inapplicable . <ul> @@ -100,7 +100,7 @@ inapplicable Inapplicable task in a "loose" list. Note that the `<del>` tag is not applied to the loose text; it has strikethrough applied with CSS. -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [~] inapplicable text in loose list @@ -131,7 +131,7 @@ This data can be used by static site generators like Jekyll, Hugo, and many othe YAML front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab --- title: YAML front matter --- @@ -145,7 +145,7 @@ title: YAML front matter TOML front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab +++ title: TOML front matter +++ @@ -159,7 +159,7 @@ title: TOML front matter JSON front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab ;;; { "title": "JSON front matter" @@ -177,7 +177,7 @@ JSON front matter: Front matter blocks should be inserted at the top of the document: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab text --- @@ -191,7 +191,7 @@ title: YAML front matter Front matter block delimiters shouldn’t be preceded by space characters: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab --- title: YAML front matter --- diff --git a/glfm_specification/output/spec.txt b/glfm_specification/output/spec.txt index 32cb6a0594ef05cfd68dcb5758b248d0beab203f..49018b0222038fb6375255beb624f520f7f15634 100644 --- a/glfm_specification/output/spec.txt +++ b/glfm_specification/output/spec.txt @@ -9615,7 +9615,7 @@ examples may be split into multiple top-level headings in the future. See [the footnotes section of the user-facing documentation for GitLab Flavored Markdown](https://docs.gitlab.com/ee/user/markdown.html#footnotes). -```````````````````````````````` example gitlab footnote +```````````````````````````````` example gitlab footnote reference tag [^fortytwo] [^fortytwo]: footnote text @@ -9657,7 +9657,7 @@ The following are some basic examples; more examples may be added in the future. Incomplete task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [ ] incomplete . <ul> @@ -9671,7 +9671,7 @@ incomplete Completed task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [x] completed . <ul> @@ -9685,7 +9685,7 @@ completed Inapplicable task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [~] inapplicable . <ul> @@ -9702,7 +9702,7 @@ inapplicable Inapplicable task in a "loose" list. Note that the `<del>` tag is not applied to the loose text; it has strikethrough applied with CSS. -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [~] inapplicable text in loose list @@ -9733,7 +9733,7 @@ This data can be used by static site generators like Jekyll, Hugo, and many othe YAML front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab --- title: YAML front matter --- @@ -9747,7 +9747,7 @@ title: YAML front matter TOML front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab +++ title: TOML front matter +++ @@ -9761,7 +9761,7 @@ title: TOML front matter JSON front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab ;;; { "title": "JSON front matter" @@ -9779,7 +9779,7 @@ JSON front matter: Front matter blocks should be inserted at the top of the document: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab text --- @@ -9793,7 +9793,7 @@ title: YAML front matter Front matter block delimiters shouldn’t be preceded by space characters: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab --- title: YAML front matter --- diff --git a/spec/scripts/lib/glfm/parse_examples_spec.rb b/spec/scripts/lib/glfm/parse_examples_spec.rb index 7caba95e10ea5a66ce6809a8a1c0808fe5b7bb4b..6fe1149a3789d17607ed8ecb42a46c71d80b90ee 100644 --- a/spec/scripts/lib/glfm/parse_examples_spec.rb +++ b/spec/scripts/lib/glfm/parse_examples_spec.rb @@ -74,7 +74,7 @@ ## 2.1.0 H2 - ```````````````````````````````` example gitlab extension_2.1.0-1 + ```````````````````````````````` example gitlab example 6 md . html @@ -220,7 +220,7 @@ disabled: false, end_line: 69, example: 6, - extensions: %w[gitlab extension_2.1.0-1], + extensions: %w[gitlab], headers: [ '2.0.0 New H1', '2.1.0 H2' diff --git a/spec/scripts/lib/glfm/update_example_snapshots_spec.rb b/spec/scripts/lib/glfm/update_example_snapshots_spec.rb index 6bf4dc3bd0d1815019448183b134df6c278db57a..7177fd83761f77402b8e8773b501b102a13c1d1c 100644 --- a/spec/scripts/lib/glfm/update_example_snapshots_spec.rb +++ b/spec/scripts/lib/glfm/update_example_snapshots_spec.rb @@ -128,7 +128,7 @@ ## Strong but with two asterisks - ```````````````````````````````` example gitlab strong + ```````````````````````````````` example gitlab **bold** . <p><strong>bold</strong></p> @@ -155,7 +155,7 @@ `source_specification` will be `gitlab`. - ```````````````````````````````` example gitlab strong + ```````````````````````````````` example gitlab <strong> bold </strong> @@ -169,7 +169,7 @@ ## Strong but skipped - ```````````````````````````````` example gitlab strong + ```````````````````````````````` example gitlab **this example will be skipped** . <p><strong>this example will be skipped</strong></p> @@ -177,7 +177,7 @@ ## Strong but manually modified and skipped - ```````````````````````````````` example gitlab strong + ```````````````````````````````` example gitlab **This example will have its manually modified static HTML, WYSIWYG HTML, and ProseMirror JSON preserved** . <p><strong>This example will have its manually modified static HTML, WYSIWYG HTML, and ProseMirror JSON preserved</strong></p>