xref: /dokuwiki/_test/tests/Parsing/Markdown/gfm-spec/skip.php (revision 8ed75a23932353c18b43f67323808e9a662f532a)
172b2703bSAndreas Gohr<?php
272b2703bSAndreas Gohr
372b2703bSAndreas Gohr/**
472b2703bSAndreas Gohr * GFM spec examples that GfmSpecTest should skip, keyed by example number
572b2703bSAndreas Gohr * (as numbered in spec.txt / the rendered spec).
672b2703bSAndreas Gohr *
772b2703bSAndreas Gohr * Add entries here ONLY for behavior DokuWiki has explicitly decided not to
872b2703bSAndreas Gohr * implement — not for features that are merely pending. Unimplemented
972b2703bSAndreas Gohr * features should show as real failures so they remain visible TODOs on
1072b2703bSAndreas Gohr * the branch.
1172b2703bSAndreas Gohr *
1272b2703bSAndreas Gohr * Each value is a short human-readable reason that will appear in phpunit's
1372b2703bSAndreas Gohr * skip output.
1472b2703bSAndreas Gohr */
1572b2703bSAndreas Gohr
1672b2703bSAndreas Gohrreturn [
1772b2703bSAndreas Gohr    // --------------------------------------------------------------------
18*8ed75a23SAndreas Gohr    // Code-span edge cases that collide with project-wide decisions
19*8ed75a23SAndreas Gohr    // (no raw HTML, no GFM angle-bracket autolinks, typography on by
20*8ed75a23SAndreas Gohr    // default) or with the single-pass lexer's limits.
21*8ed75a23SAndreas Gohr    // --------------------------------------------------------------------
22*8ed75a23SAndreas Gohr    351 => 'code span vs. emphasis: cross-positional precedence would require'
23*8ed75a23SAndreas Gohr         . ' a pre-scan pass — the single-pass lexer matches leftmost-first'
24*8ed75a23SAndreas Gohr         . ' and cannot reject an earlier emphasis opener because a later'
25*8ed75a23SAndreas Gohr         . ' backtick span would consume its closer',
26*8ed75a23SAndreas Gohr    353 => 'code span: the trailing `"` outside the span is converted to a'
27*8ed75a23SAndreas Gohr         . ' curly quote by DokuWiki typography, diverging from the spec HTML',
28*8ed75a23SAndreas Gohr    354 => 'raw HTML tag pass-through: DokuWiki does not render raw HTML by'
29*8ed75a23SAndreas Gohr         . ' default; `<html>` blocks are the opt-in',
30*8ed75a23SAndreas Gohr    356 => 'GFM angle-bracket autolink `<http://…>`: not implemented — we'
31*8ed75a23SAndreas Gohr         . ' rely on DokuWiki\'s existing bare-URL detection, which does not'
32*8ed75a23SAndreas Gohr         . ' parse `<URL>` form',
33*8ed75a23SAndreas Gohr
34*8ed75a23SAndreas Gohr    // --------------------------------------------------------------------
3572b2703bSAndreas Gohr    // CommonMark §6.2 flanking-delimiter analysis — deliberately not
3672b2703bSAndreas Gohr    // implemented. DokuWiki's regex lexer uses leftmost-match and cannot
3772b2703bSAndreas Gohr    // apply CommonMark's left/right-flanking rules that distinguish
3872b2703bSAndreas Gohr    // word-chars, whitespace, and punctuation for `*`/`_` delimiters, or
3972b2703bSAndreas Gohr    // the "multiple-of-3" rule for overlapping runs. These examples all
4072b2703bSAndreas Gohr    // rely on that machinery.
4172b2703bSAndreas Gohr    // --------------------------------------------------------------------
4272b2703bSAndreas Gohr
4372b2703bSAndreas Gohr    // Unicode whitespace in flanking context. Our `\s` is ASCII-only
4472b2703bSAndreas Gohr    // because the lexer doesn't set the PCRE `u` flag.
4572b2703bSAndreas Gohr    363 => 'Unicode whitespace (U+00A0) flanking — requires u-flag-aware regex',
4672b2703bSAndreas Gohr
4772b2703bSAndreas Gohr    // Punctuation-adjacent flanking for `*` / `_` / `**` / `__`
4872b2703bSAndreas Gohr    362 => 'flanking: punctuation-adjacent `*` (left-flanking vs. right-flanking)',
4972b2703bSAndreas Gohr    368 => 'flanking: punctuation-adjacent `_`',
5072b2703bSAndreas Gohr    372 => 'flanking: intraword `_` with punctuation inside',
5172b2703bSAndreas Gohr    377 => 'flanking: `*` followed by `(` requires punctuation-aware flanking',
5272b2703bSAndreas Gohr    378 => 'flanking: nested `*(*foo*)*` requires flanking + balanced-pair analysis',
5372b2703bSAndreas Gohr    382 => 'flanking: nested `_(_foo_)_` requires flanking + balanced-pair analysis',
5472b2703bSAndreas Gohr    389 => 'flanking: punctuation-adjacent `**`',
5572b2703bSAndreas Gohr    394 => 'flanking: punctuation-adjacent `__`',
5672b2703bSAndreas Gohr    401 => 'flanking: `**` followed by `(`',
5772b2703bSAndreas Gohr    404 => 'flanking: nested `*bar*` inside `**foo ... foo**` with punctuation',
5872b2703bSAndreas Gohr    407 => 'flanking: `__` followed by `(`',
5972b2703bSAndreas Gohr    470 => 'flanking: nested `*_foo_*` requires balanced-pair analysis',
6072b2703bSAndreas Gohr    472 => 'flanking: nested `_*foo*_` requires balanced-pair analysis',
6172b2703bSAndreas Gohr
6272b2703bSAndreas Gohr    // Intraword `__` strong (even multibyte) — flanking rule for `_` requires
6372b2703bSAndreas Gohr    // examining whether the delimiter run is word-boundary-flanking, which our
6472b2703bSAndreas Gohr    // simple lookbehind/lookahead approximation doesn't fully match.
6572b2703bSAndreas Gohr    395 => 'flanking: intraword `__` (`foo__bar__`) — left-flanking vs right-flanking',
6672b2703bSAndreas Gohr    396 => 'flanking: intraword `__` across digits (`5__6__78`)',
6772b2703bSAndreas Gohr    397 => 'flanking: intraword `__` with Cyrillic',
6872b2703bSAndreas Gohr    398 => 'flanking: `__foo, __bar__, baz__` — flanking + balanced pairing',
6972b2703bSAndreas Gohr    409 => 'flanking: `__foo__bar` — intraword close',
7072b2703bSAndreas Gohr    410 => 'flanking: intraword `__` with Cyrillic (leading)',
7172b2703bSAndreas Gohr    411 => 'flanking: `__foo__bar__baz__` — multiple `__` pairs with flanking',
7272b2703bSAndreas Gohr    412 => 'flanking: `__(bar)__.` — punctuation-adjacent',
7372b2703bSAndreas Gohr
7472b2703bSAndreas Gohr    // Overlapping / multiple-of-3 rule for runs
7572b2703bSAndreas Gohr    416 => 'CommonMark rule 9 (overlapping same-delimiter `_foo _bar_ baz_`)',
7672b2703bSAndreas Gohr    417 => 'CommonMark overlapping `_` / `__` with flanking',
7772b2703bSAndreas Gohr    418 => 'CommonMark overlapping `*foo *bar**` — multiple-of-3 rule',
7872b2703bSAndreas Gohr    419 => 'CommonMark nested `*foo **bar** baz*` — balanced-pair analysis',
7972b2703bSAndreas Gohr    421 => 'CommonMark overlapping `*foo**bar*` — multiple-of-3',
8072b2703bSAndreas Gohr    422 => 'CommonMark nested `***foo** bar*` — triple-delimiter analysis',
8172b2703bSAndreas Gohr    423 => 'CommonMark nested `*foo **bar***` — triple-delimiter analysis',
8272b2703bSAndreas Gohr    424 => 'CommonMark nested `*foo**bar***` — triple-delimiter analysis',
8372b2703bSAndreas Gohr    425 => 'CommonMark triple `foo***bar***baz` — triple-delimiter analysis',
8472b2703bSAndreas Gohr    426 => 'CommonMark long delimiter runs `foo******bar*********baz`',
8572b2703bSAndreas Gohr    427 => 'CommonMark deeply nested `*foo **bar *baz* bim** bop*`',
8672b2703bSAndreas Gohr    434 => 'CommonMark overlapping `__foo __bar__ baz__` — multiple-of-3',
8772b2703bSAndreas Gohr    435 => 'CommonMark `____foo__ bar__` — leading long delimiter run',
8872b2703bSAndreas Gohr    436 => 'CommonMark `**foo **bar****` — trailing long delimiter run',
8972b2703bSAndreas Gohr    439 => 'CommonMark nested `***foo* bar**` — triple-delimiter',
9072b2703bSAndreas Gohr    440 => 'CommonMark nested `**foo *bar***` — triple-delimiter',
9172b2703bSAndreas Gohr    441 => 'CommonMark deeply nested `**foo *bar **baz** bim* bop**`',
9272b2703bSAndreas Gohr
9372b2703bSAndreas Gohr    // `__foo_` / `_foo__` — mixing `_` and `__` requires flanking to decide
9472b2703bSAndreas Gohr    // which delimiter pairs open/close.
9572b2703bSAndreas Gohr    463 => 'flanking: `__foo_` — mixed `_`/`__` pairing',
9672b2703bSAndreas Gohr    464 => 'flanking: `_foo__` — mixed `_`/`__` pairing',
9772b2703bSAndreas Gohr    465 => 'flanking: `___foo__` — delimiter-run length analysis',
9872b2703bSAndreas Gohr    466 => 'flanking: `____foo_` — delimiter-run length analysis',
9972b2703bSAndreas Gohr    467 => 'flanking: `__foo___` — delimiter-run length analysis',
10072b2703bSAndreas Gohr    468 => 'flanking: `_foo____` — delimiter-run length analysis',
10172b2703bSAndreas Gohr
10272b2703bSAndreas Gohr    // Long delimiter runs require excess-drop logic (2 outer chars dropped
10372b2703bSAndreas Gohr    // from each side). Stack-based pairing needed — out of scope.
10472b2703bSAndreas Gohr    473 => 'CommonMark `****foo****` — excess-drop (4+4 → strong only)',
10572b2703bSAndreas Gohr    474 => 'CommonMark `____foo____` — excess-drop (4+4 → strong only)',
10672b2703bSAndreas Gohr    475 => 'CommonMark `******foo******` — excess-drop (6+6 → strong only)',
10772b2703bSAndreas Gohr    477 => 'CommonMark `_____foo_____` — excess-drop (5+5 → em+strong, 2 dropped each side)',
10872b2703bSAndreas Gohr
10972b2703bSAndreas Gohr    // Overlapping / crossing delimiters
11072b2703bSAndreas Gohr    478 => 'CommonMark `*foo _bar* baz_` — overlapping different delimiters',
11172b2703bSAndreas Gohr    479 => 'CommonMark `*foo __bar *baz bim__ bam*` — crossing delimiters',
11272b2703bSAndreas Gohr    480 => 'CommonMark `**foo **bar baz**` — overlapping same delimiter',
11372b2703bSAndreas Gohr];
114