Commit 49558e0
authored
Add test suite for highlight.js Djot grammar (#100)
* Add test suite for highlight.js Djot grammar
- Add docs/tests/ with Node.js test suite using highlight.js
- 50 test cases covering all Djot syntax elements
- Add GitHub workflow to run tests on PRs affecting hljs-djot.js
* Expand hljs test suite to 118 comprehensive tests
Cover all Djot syntax elements:
- Headings (levels 1-6)
- Emphasis/strong variations
- Code (inline, double/triple backtick, fences)
- Links (inline, reference, shortcut, autolink, email)
- Images (with titles, attributes)
- Lists (all markers, numbered, task, indented)
- Blockquotes, divs (with 4+ colons)
- Tables (rows, separators, alignment)
- Comments (inline, fenced)
- Highlight, insert, delete
- Super/subscript (shorthand and braced)
- Math (inline, display)
- Definitions (reference, footnote, abbreviation)
- Attributes (class, id, key-value, complex)
- Horizontal rules, symbols, smart punctuation
- Escapes, raw format, captions, line blocks
- Frontmatter, hard line breaks
- Edge cases with multiple elements1 parent 9b944a0 commit 49558e0
5 files changed
Lines changed: 785 additions & 0 deletions
File tree
- .github/workflows
- docs/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments