xref: /dokuwiki/_test/tests/Parsing/Markdown/gfm-spec/README.md (revision 72b2703b4f922ca520e7cb2e7765a252175f30d3)
1*72b2703bSAndreas Gohr# GFM Spec Test Fixture
2*72b2703bSAndreas Gohr
3*72b2703bSAndreas Gohr`spec.txt` is the authoritative test document for GitHub Flavored Markdown
4*72b2703bSAndreas Gohr(GFM). It combines CommonMark's test examples with GFM-specific extensions
5*72b2703bSAndreas Gohr(tables, strikethrough, task lists, autolink extension, disallowed raw HTML)
6*72b2703bSAndreas Gohrin a single fenced-example file.
7*72b2703bSAndreas Gohr
8*72b2703bSAndreas Gohr## Upstream
9*72b2703bSAndreas Gohr
10*72b2703bSAndreas Gohr- Project: https://github.com/github/cmark-gfm
11*72b2703bSAndreas Gohr- Source path: `test/spec.txt`
12*72b2703bSAndreas Gohr- Pinned commit: `587a12bb54d95ac37241377e6ddc93ea0e45439b` (2023-07-21)
13*72b2703bSAndreas Gohr- Spec version: 0.29 (date: 2019-04-06, as recorded in the file header)
14*72b2703bSAndreas Gohr- License: CC-BY-SA 4.0 (see `LICENSE` in this directory)
15*72b2703bSAndreas Gohr
16*72b2703bSAndreas Gohr## Re-syncing
17*72b2703bSAndreas Gohr
18*72b2703bSAndreas Gohr```
19*72b2703bSAndreas Gohrcurl -fsSL -o spec.txt https://raw.githubusercontent.com/github/cmark-gfm/<COMMIT>/test/spec.txt
20*72b2703bSAndreas Gohr```
21*72b2703bSAndreas Gohr
22*72b2703bSAndreas GohrUpdate this README's pinned-commit line and re-run the suite. Example numbers
23*72b2703bSAndreas Gohrmay shift between versions — adjust `skip.php` entries accordingly.
24*72b2703bSAndreas Gohr
25*72b2703bSAndreas Gohr## License note
26*72b2703bSAndreas Gohr
27*72b2703bSAndreas GohrThis fixture is included under CC-BY-SA 4.0 — a share-alike license separate
28*72b2703bSAndreas Gohrfrom DokuWiki's GPLv2. The two coexist cleanly because this file lives in
29*72b2703bSAndreas Gohrits own directory with its own `LICENSE`, is test data (not compiled into
30*72b2703bSAndreas Gohrshipped binaries), and is preserved verbatim with attribution. Any
31*72b2703bSAndreas Gohrmodifications to the fixture itself would have to remain CC-BY-SA 4.0 —
32*72b2703bSAndreas Gohrbut modifications aren't expected; the file is treated as upstream-owned.
33*72b2703bSAndreas Gohr
34*72b2703bSAndreas Gohr## Usage
35*72b2703bSAndreas Gohr
36*72b2703bSAndreas Gohr`SpecReader` (`../../SpecReader.php`) parses this file's fenced-example blocks
37*72b2703bSAndreas Gohrinto individual test records. `GfmSpecTest` uses the reader as a data
38*72b2703bSAndreas Gohrprovider. Deliberately out-of-scope examples are listed in `skip.php` with a
39*72b2703bSAndreas Gohrshort reason each.
40