diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:29:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-29 04:29:52 +0000 |
commit | fcb2f10732db61d216e2105c8154486f66b3e3ff (patch) | |
tree | efda929db4b1543eecc583e3b7d9c0bad4cd86a6 /tests/fixtures/front_matter.md | |
parent | Initial commit. (diff) | |
download | mdit-py-plugins-fcb2f10732db61d216e2105c8154486f66b3e3ff.tar.xz mdit-py-plugins-fcb2f10732db61d216e2105c8154486f66b3e3ff.zip |
Adding upstream version 0.3.3.upstream/0.3.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/fixtures/front_matter.md | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/tests/fixtures/front_matter.md b/tests/fixtures/front_matter.md new file mode 100644 index 0000000..e01fd4e --- /dev/null +++ b/tests/fixtures/front_matter.md @@ -0,0 +1,87 @@ + +should parse empty front matter: +. +--- +--- +# Head +. + +<h1>Head</h1> +. + + +should parse basic front matter: +. +--- +x: 1 +--- +# Head +. + +<h1>Head</h1> +. + +should parse until triple dots: +. +--- +x: 1 +... +# Head +. + +<h1>Head</h1> +. + +should parse front matter with indentation: +. +--- +title: Associative arrays +people: + name: John Smith + age: 33 +morePeople: { name: Grace Jones, age: 21 } +--- +# Head +. + +<h1>Head</h1> +. + +should ignore spaces after front matter delimiters: +. +--- +title: Associative arrays +people: + name: John Smith + age: 33 +morePeople: { name: Grace Jones, age: 21 } +--- +# Head +. + +<h1>Head</h1> +. + +should ignore front matter with less than 3 opening dashes: +. +-- +x: 1 +-- +# Head +. +<h2>-- +x: 1</h2> +<h1>Head</h1> +. + +should require front matter have matching number of opening and closing dashes: +. +---- +x: 1 +--- +# Head +. +<hr> +<h2>x: 1</h2> +<h1>Head</h1> +. |