1<?php 2 3/** 4 * GFM spec examples that GfmSpecTest should skip, keyed by example number (as numbered in spec.txt). 5 * 6 * All entries skipped here are things that are explicitly not supported by DokuWiki's Markdown mode, for reasons 7 * documented in the skip reason (mostly limitations of the single-pass regex lexer). 8 * 9 * Most of the skipped examples are edge cases that are rarely used in practice. 10 * 11 * Entries are ordered by example number, when the underlying spec.txt is updated, its example numbers may shift, 12 * so the keys here may need to be updated to match the new example numbers. 13 */ 14 15return [ 16 17 // ----------------------------------------------------------------------------------------------------------------- 18 // Tabs (§2.2) 19 // 20 // DokuWiki's tab handling is binary: a leading tab (matching \n\t directly after the newline) is the indented-code 21 // trigger, otherwise tabs are ordinary characters. 22 // 23 // CommonMark instead advances each tab to the next 4-column stop and uses the resulting column count to drive 24 // list-continuation, list-nesting, blockquote-interior, and 4-column indented-code decisions. The column arithmetic 25 // is what we don't support. 26 // ----------------------------------------------------------------------------------------------------------------- 27 28 2 => 'Tabs (§2.2): 2 spaces then tab as code trigger - no column arithmetic to advance tab to column 4', 29 4 => 'Tabs (§2.2): tab as 4-column lazy continuation in list - list-interior column arithmetic not implemented', 30 5 => 'Tabs (§2.2): two tabs (8 columns) inside list item - list-interior column arithmetic not implemented', 31 6 => 'Tabs (§2.2): tabs after blockquote marker for code - quote-interior column arithmetic not implemented', 32 7 => 'Tabs (§2.2): tabs after list marker for indented code - list-interior column arithmetic not implemented', 33 9 => 'Tabs (§2.2): tab as 4-column indent for list nesting - leading tab is code trigger, never a nesting indent', 34 11 => 'Tabs (§2.2): thematic break with tab separators - strict bare-run HR rejects internal whitespace', 35 36 // ----------------------------------------------------------------------------------------------------------------- 37 // Thematic breaks aka. HRs (§4.1) 38 // 39 // We only support horizontal rules siting at column 0 with no leading, trailing, or internal whitespace. 40 // ----------------------------------------------------------------------------------------------------------------- 41 42 17 => 'Thematic breaks (§4.1): HR with 0-3 spaces of leading indent - column-0-only opener required', 43 19 => 'Thematic breaks (§4.1): HR after paragraph with 4-space indent - Preformatted triggers regardless of state', 44 21 => 'Thematic breaks (§4.1): HR with spaces between delimiters (- - -) - no whitespace allowed', 45 22 => 'Thematic breaks (§4.1): HR with spaces between delimiters (** * **) - no whitespace allowed', 46 23 => 'Thematic breaks (§4.1): HR with spaces between delimiters (- -) - no whitespace allowed', 47 24 => 'Thematic breaks (§4.1): HR with internal spaces and trailing whitespace - no whitespace allowed', 48 29 => 'Thematic breaks (§4.1): Setext underline disambiguation - Setext headers not supported', 49 30 => 'Thematic breaks (§4.1): HR between list items (* * *) - no whitespace allowed', 50 31 => 'Thematic breaks (§4.1): HR shape inside list item - HRs not supported inside lists', 51 52 // ----------------------------------------------------------------------------------------------------------------- 53 // ATX headings (§4.2) 54 // 55 // We only support headers sitting at column 0 with no leading whitespace. 56 // ----------------------------------------------------------------------------------------------------------------- 57 58 38 => 'ATX headings (§4.2): heading with 0-3 spaces of leading indent - column-0-only opener required', 59 40 => 'ATX headings (§4.2): 4-space indent after paragraph as lazy text - no paragraph-open state in lexer', 60 41 => 'ATX headings (§4.2): heading with 2-space leading indent - column-0-only opener required', 61 49 => 'ATX headings (§4.2): empty heading - XHTML renderer skips blank headings via blank() guard', 62 63 // ----------------------------------------------------------------------------------------------------------------- 64 // Setext (§4.3) 65 // 66 // Setext headings are not supported. They are hard to pass and nobody uses them anymore. 67 // ----------------------------------------------------------------------------------------------------------------- 68 69 50 => 'Setext (§4.3): heading with emphasis and underline - Setext headings not supported', 70 51 => 'Setext (§4.3): heading with multi-line content - Setext headings not supported', 71 52 => 'Setext (§4.3): heading with indented multi-line content - Setext headings not supported', 72 53 => 'Setext (§4.3): heading with any-length underline - Setext headings not supported', 73 54 => 'Setext (§4.3): heading with 3-space-indented content/underline - Setext headings not supported', 74 55 => 'Setext (§4.3): 4-space-indented content forms code then HR - Setext headings not supported', 75 56 => 'Setext (§4.3): underline indented up to 3 spaces with trailing - Setext headings not supported', 76 57 => 'Setext (§4.3): 4-space-indented underline (paragraph wins) - Setext headings not supported', 77 58 => 'Setext (§4.3): underline with internal spaces (= = / --- -) - Setext and internal-space HR not supported', 78 59 => 'Setext (§4.3): trailing spaces in content do not break line - Setext headings not supported', 79 60 => 'Setext (§4.3): trailing backslash in content - Setext headings not supported', 80 61 => 'Setext (§4.3): block-structure precedence over inline - Setext headings not supported', 81 63 => 'Setext (§4.3): underline cannot be lazy continuation in quote - Setext headings not supported', 82 65 => 'Setext (§4.3): preceding paragraph becomes heading content - Setext headings not supported', 83 66 => 'Setext (§4.3): no blank line required before/after heading - Setext headings not supported', 84 70 => 'Setext (§4.3): 4-space-indented content forms code then --- HR - Setext headings not supported', 85 72 => 'Setext (§4.3): heading with backslash-escaped marker - Setext headings not supported', 86 73 => 'Setext (§4.3): paragraph + heading + paragraph blank-separated - Setext headings not supported', 87 75 => 'Setext (§4.3): * * * boundary should be HR not underline - Setext and internal-space HR not supported', 88 76 => 'Setext (§4.3): backslash-escaped underline keeps as paragraph - Setext headings not supported', 89 90 // ----------------------------------------------------------------------------------------------------------------- 91 // Indented code (§4.4) 92 // 93 // DokuWiki's single-pass lexer cannot carry paragraph-open state across modes, so Preformatted triggers on every \n 94 // followed by 4-space indent and exits on every blank line. Two CommonMark rules consequently cannot be expressed: 95 // 96 // - The 4-space indent must NOT open a code block on a paragraph-continuation line — GFM treats it as lazy 97 // paragraph text. There is no paragraph-open flag to consult. 98 // - An indented code block MAY span blank lines as long as the next non-blank line is still 4-space indented. 99 // DokuWiki's exit-on-any-blank-line behavior splits the block. 100 // 101 // List-interior indented code (79, 80) additionally needs the column arithmetic that the §2.2 tabs family already 102 // documents as out of scope. 103 // ----------------------------------------------------------------------------------------------------------------- 104 105 79 => 'Indented code (§4.4): inside list item - list-interior column arithmetic plus paragraph trigger', 106 80 => 'Indented code (§4.4): after content in list item - list-interior column arithmetic plus paragraph trigger', 107 81 => 'Indented code (§4.4): code block spanning blank lines - fully blank lines exit the block', 108 83 => 'Indented code (§4.4): 4-space indent on paragraph continuation - no paragraph-open state in lexer', 109 85 => 'Indented code (§4.4): 4-space indent mid-paragraph variant - no paragraph-open state in lexer', 110 111 // ----------------------------------------------------------------------------------------------------------------- 112 // Fenced code (§4.5) 113 // 114 // Our parser does not support backreferences in regexes, so we cannot enforce the fence-length pairing rules that 115 // CommonMark requires for closing a fenced code block. 116 // 117 // We require fence runs to sit at column 0, no leading spaces allowed. 118 // 119 // Unclosed fences stay literal because the single-pass lexer has no notion of container boundaries to close at, 120 // unlike CommonMark's two-pass block parser. 121 // ----------------------------------------------------------------------------------------------------------------- 122 123 94 => 'Fenced code (§4.5): closer must be >= opener length - no regex backreferences, any 3+ run closes', 124 95 => 'Fenced code (§4.5): closer length pairing for tilde fence - no regex backreferences for length pairing', 125 96 => 'Fenced code (§4.5): unclosed fence consuming to EOF - no container boundaries in lexer', 126 97 => 'Fenced code (§4.5): unclosed fence with intervening short run - no container boundaries in lexer', 127 98 => 'Fenced code (§4.5): fence inside blockquote closes at quote end - no container boundaries in lexer', 128 101 => 'Fenced code (§4.5): opener indented 1 space - column-0-only policy, indent tolerance out of scope', 129 102 => 'Fenced code (§4.5): opener indented 2 spaces - column-0-only policy', 130 103 => 'Fenced code (§4.5): opener indented 3 spaces - column-0-only policy', 131 105 => 'Fenced code (§4.5): closer indented 2 spaces - column-0-only policy', 132 106 => 'Fenced code (§4.5): indented opener with less-indented closer - column-0-only policy', 133 107 => 'Fenced code (§4.5): 4-space-indented closer - column-0-only policy, no valid closer, fence stays literal', 134 108 => 'Fenced code (§4.5): three-backtick fallback to inline span - backtick spans with n>=3 not implemented', 135 109 => 'Fenced code (§4.5): malformed closer with space-broken run - no valid closer, fence stays literal', 136 111 => 'Fenced code (§4.5): fence interrupting Setext heading - Setext headings not supported', 137 115 => 'Fenced code (§4.5): single-line ``` x ``` - 3+ backtick inline code spans are not implemented', 138 139 // ----------------------------------------------------------------------------------------------------------------- 140 // HTML blocks (§4.6) 141 // 142 // Raw HTML pass-through is not supported. DokuWiki therefore renders it as escaped text. 143 // ----------------------------------------------------------------------------------------------------------------- 144 145 118 => 'HTML blocks (§4.6): script/pre/style/textarea tag group - raw HTML pass-through not supported', 146 119 => 'HTML blocks (§4.6): table with following content - raw HTML pass-through not supported', 147 120 => 'HTML blocks (§4.6): div with leading-space indent - raw HTML pass-through not supported', 148 121 => 'HTML blocks (§4.6): closing div tag opens block - raw HTML pass-through not supported', 149 122 => 'HTML blocks (§4.6): uppercase DIV with attributes - raw HTML pass-through not supported', 150 123 => 'HTML blocks (§4.6): div with id on continuation line - raw HTML pass-through not supported', 151 124 => 'HTML blocks (§4.6): div with multi-line attribute - raw HTML pass-through not supported', 152 125 => 'HTML blocks (§4.6): div opening - raw HTML pass-through not supported', 153 126 => 'HTML blocks (§4.6): div with id attribute - raw HTML pass-through not supported', 154 127 => 'HTML blocks (§4.6): div with class attribute spread - raw HTML pass-through not supported', 155 128 => 'HTML blocks (§4.6): div with garbage attribute syntax - raw HTML pass-through not supported', 156 129 => 'HTML blocks (§4.6): div with anchor and literal asterisks - raw HTML pass-through not supported', 157 130 => 'HTML blocks (§4.6): table with closing td/tr/table - raw HTML pass-through not supported', 158 131 => 'HTML blocks (§4.6): self-closing div on single line - raw HTML pass-through not supported', 159 132 => 'HTML blocks (§4.6): anchor as block-level element - raw HTML pass-through not supported', 160 133 => 'HTML blocks (§4.6): unknown tag falls into any-tag group - raw HTML pass-through not supported', 161 134 => 'HTML blocks (§4.6): inline tag (i) treated as block - raw HTML pass-through not supported', 162 135 => 'HTML blocks (§4.6): closing ins tag opens block - raw HTML pass-through not supported', 163 136 => 'HTML blocks (§4.6): del with paragraph break inside - raw HTML pass-through not supported', 164 137 => 'HTML blocks (§4.6): del without blank line breaks - raw HTML pass-through not supported', 165 138 => 'HTML blocks (§4.6): del with literal asterisks inline - raw HTML pass-through not supported', 166 139 => 'HTML blocks (§4.6): pre with language and code child - raw HTML pass-through not supported', 167 140 => 'HTML blocks (§4.6): script tag - raw HTML pass-through not supported', 168 141 => 'HTML blocks (§4.6): style tag opening - raw HTML pass-through not supported', 169 142 => 'HTML blocks (§4.6): unclosed style consuming rest of input - raw HTML pass-through not supported', 170 143 => 'HTML blocks (§4.6): style inside blockquote - raw HTML pass-through not supported', 171 144 => 'HTML blocks (§4.6): style inside list item - raw HTML pass-through not supported', 172 145 => 'HTML blocks (§4.6): style followed by inline content - raw HTML pass-through not supported', 173 146 => 'HTML blocks (§4.6): comment with following inline content - raw HTML pass-through not supported', 174 147 => 'HTML blocks (§4.6): script tag with body content - raw HTML pass-through not supported', 175 148 => 'HTML blocks (§4.6): comment - raw HTML pass-through not supported', 176 149 => 'HTML blocks (§4.6): processing instruction - raw HTML pass-through not supported', 177 150 => 'HTML blocks (§4.6): DOCTYPE declaration - raw HTML pass-through not supported', 178 151 => 'HTML blocks (§4.6): CDATA - raw HTML pass-through not supported', 179 152 => 'HTML blocks (§4.6): comment with leading whitespace - raw HTML pass-through not supported', 180 153 => 'HTML blocks (§4.6): div with leading whitespace - raw HTML pass-through not supported', 181 154 => 'HTML blocks (§4.6): paragraph followed by div - raw HTML pass-through not supported', 182 155 => 'HTML blocks (§4.6): div followed by paragraph - raw HTML pass-through not supported', 183 156 => 'HTML blocks (§4.6): paragraph then div (any-tag group) - raw HTML pass-through not supported', 184 157 => 'HTML blocks (§4.6): div continuation across blank line - raw HTML pass-through not supported', 185 158 => 'HTML blocks (§4.6): nested divs with content between - raw HTML pass-through not supported', 186 159 => 'HTML blocks (§4.6): table followed by paragraph - raw HTML pass-through not supported', 187 160 => 'HTML blocks (§4.6): table with markdown content - raw HTML pass-through not supported', 188 189 // ----------------------------------------------------------------------------------------------------------------- 190 // Link refs (§4.7) 191 // 192 // The single-pass lexer cannot resolve forward references, so links by reference are not supported. 193 // ----------------------------------------------------------------------------------------------------------------- 194 195 161 => 'Link refs (§4.7): basic definition with title - forward-reference definitions not supported', 196 162 => 'Link refs (§4.7): definition with leading indent across lines - forward references not supported', 197 163 => 'Link refs (§4.7): definition with multi-line title - forward-reference definitions not supported', 198 164 => 'Link refs (§4.7): definition with multi-line label - forward-reference definitions not supported', 199 165 => 'Link refs (§4.7): single-quote title across newline - forward-reference definitions not supported', 200 166 => 'Link refs (§4.7): definition with whitespace-collapsed label - forward-reference definitions not supported', 201 167 => 'Link refs (§4.7): definition without matching reference use - forward-reference definitions not supported', 202 169 => 'Link refs (§4.7): pointy-bracket destination - forward-reference definitions not supported', 203 170 => 'Link refs (§4.7): destination then blank line then title - forward-reference definitions not supported', 204 171 => 'Link refs (§4.7): title-only without destination - forward-reference definitions not supported', 205 172 => 'Link refs (§4.7): backslash escapes in destination and title - forward-reference definitions not supported', 206 173 => 'Link refs (§4.7): definition with reference use following - forward-reference definitions not supported', 207 174 => 'Link refs (§4.7): case-insensitive label match - forward-reference definitions not supported', 208 175 => 'Link refs (§4.7): Unicode case folding for label - forward-reference definitions not supported', 209 176 => 'Link refs (§4.7): single definition with no body - forward-reference definitions not supported', 210 177 => 'Link refs (§4.7): definition with surrounding whitespace - forward-reference definitions not supported', 211 178 => 'Link refs (§4.7): definition indented up to 3 spaces - forward-reference definitions not supported', 212 179 => 'Link refs (§4.7): multi-line with title on next line - forward-reference definitions not supported', 213 183 => 'Link refs (§4.7): definition does not interrupt paragraph - forward-reference definitions not supported', 214 184 => 'Link refs (§4.7): between blockquote and paragraph - forward-reference definitions not supported', 215 185 => 'Link refs (§4.7): lone definition emits nothing - forward-reference definitions not supported', 216 186 => 'Link refs (§4.7): definition followed by HR - forward-reference definitions not supported', 217 187 => 'Link refs (§4.7): multiple definitions in a row - forward-reference definitions not supported', 218 188 => 'Link refs (§4.7): definition inside blockquote - forward-reference definitions not supported', 219 220 // ----------------------------------------------------------------------------------------------------------------- 221 // Paragraphs (§4.8) 222 // 223 // We do not support lazy continuation of paragraphs 224 // ----------------------------------------------------------------------------------------------------------------- 225 226 193 => 'Paragraphs (§4.8): leading whitespace on continuation lines - no paragraph-open state to suppress indent', 227 228 // ----------------------------------------------------------------------------------------------------------------- 229 // Block quotes (§5.1) 230 // 231 // We only support block quotes that sit at column 0 with no leading spaces before the > marker. 232 // 233 // Lazy continuation of block quotes is not supported - every line of a block quote must start with > at column 0. 234 // 235 // Headers are not supported inside block quotes to not mess up TOC and section edit mechanisms. 236 // ----------------------------------------------------------------------------------------------------------------- 237 238 206 => 'Block quotes (§5.1): header inside - no headers in quotes', 239 207 => 'Block quotes (§5.1): header inside with no space after > - no headers in quotes', 240 208 => 'Block quotes (§5.1): leading-space > with 1-3 spaces of indent - column-0-only policy', 241 210 => 'Block quotes (§5.1): lazy continuation without > on next line - every quote line needs > at column 0', 242 211 => 'Block quotes (§5.1): lazy continuation followed by quoted line - every quote line needs > at column 0', 243 212 => 'Block quotes (§5.1): Setext underline --- after > foo - Setext headings not supported', 244 215 => 'Block quotes (§5.1): fenced code split across boundary - depends on lazy continuation, not implemented', 245 216 => 'Block quotes (§5.1): lazy continuation with indented sub-list - every quote line needs > at column 0', 246 225 => 'Block quotes (§5.1): lazy continuation across paragraph - every quote line needs > at column 0', 247 227 => 'Block quotes (§5.1): lazy continuation with empty line then text - every quote line needs > at column 0', 248 228 => 'Block quotes (§5.1): lazy continuation in nested level - every quote line needs > at column 0', 249 229 => 'Block quotes (§5.1): lazy continuation across nested levels - every quote line needs > at column 0', 250 251 // ----------------------------------------------------------------------------------------------------------------- 252 // List items (§5.2), Task list (§5.3), Lists (§5.4) 253 // 254 // List indentation uses a fixed 2-space-multiple step starting at 0, lazy continuation is not supported. 255 // 256 // We do not separate into tight and loose lists, but blank lines inside lists are still allowed and do not 257 // interrupt the list - they just don't trigger the extra-paragraph wrapping that CommonMark applies to loose lists. 258 // 259 // The rewriter groups items by 'u'/'o' type only, not by marker character. 260 // 261 // The task-list extension is not supported 262 // ----------------------------------------------------------------------------------------------------------------- 263 264 232 => 'List items (§5.2): marker-width content-column for indented body - extra spaces after marker collapsed', 265 235 => 'List items (§5.2): marker-width content-column with continuation - extra spaces after marker collapsed', 266 237 => 'List items (§5.2): ordered nested in >> with 3-space indent - leading-> indent plus marker-width column', 267 238 => 'List items (§5.2): bullet inside >> with leading-space continuation - column-0-only > plus interior space', 268 241 => 'List items (§5.2): marker-width column with code/paragraph/quote - extra spaces after marker collapsed', 269 242 => 'List items (§5.2): marker-width column plus indented code blanks - extra spaces plus blank-spanning code', 270 249 => 'List items (§5.2): marker-width content-column for 10. foo - extra spaces after marker collapsed', 271 254 => 'List items (§5.2): marker-width content-column edge case - extra spaces after marker collapsed', 272 257 => 'List items (§5.2): empty bullet line then content next line - content column from next line not derived', 273 258 => 'List items (§5.2): marker-width content-column for 1. foo - extra spaces after marker collapsed', 274 263 => 'List items (§5.2): indent ambiguity at column 0/1/2 - 1- or 3-space indent rounded to nearest 2', 275 264 => 'List items (§5.2): 1-space-indent nesting variation - 1- or 3-space indent rounded to nearest 2', 276 265 => 'List items (§5.2): marker-width with multi-line continuation - extra spaces after marker collapsed', 277 266 => 'List items (§5.2): marker-width with multi-line continuation variant - extra spaces after marker collapsed', 278 267 => 'List items (§5.2): lazy continuation inside list item - column-0 paragraph wrap not supported', 279 268 => 'List items (§5.2): lazy continuation across line break - column-0 paragraph wrap not supported', 280 270 => 'List items (§5.2): lazy continuation across blank line - lazy plus loose/tight rules not implemented', 281 271 => 'List items (§5.2): lazy continuation in nested quote-list-quote - column-0 paragraph wrap not supported', 282 273 => 'List items (§5.2): interrupting paragraph without blank line - requires multi-pass parser to revisit text', 283 275 => 'List items (§5.2): 3-space indent rounds to 2 for sub-list - 1- or 3-space indent rounded to nearest 2', 284 276 => 'List items (§5.2): marker-width column with mixed types - extra spaces plus marker-character splits', 285 277 => 'List items (§5.2): nested markers on a single line - extra spaces after marker collapsed', 286 278 => 'List items (§5.2): marker-character switch splits the run - rewriter groups by u/o type, not character', 287 279 => 'Task list (§5.3): basic checkbox marker - extension not implemented, literal [ ]/[x] stays as content', 288 280 => 'Task list (§5.3): nested checkbox markers - extension not implemented, literal brackets stay as content', 289 281 => 'Lists (§5.4): marker-character change unordered (- to +) - rewriter groups by u/o type, not character', 290 282 => 'Lists (§5.4): ordered delimiter switch (. to )) - rewriter groups by u/o type, not character', 291 284 => 'Lists (§5.4): interrupting paragraph without blank line - requires multi-pass parser', 292 286 => 'Lists (§5.4): marker-width column for ordered list - extra spaces after marker collapsed', 293 287 => 'Lists (§5.4): triple blank plus indented continuation - loose/tight classification not implemented', 294 288 => 'Lists (§5.4): marker-character change at deeper level - rewriter groups by u/o type only', 295 289 => 'Lists (§5.4): marker-character change with type switch - rewriter groups by u/o type only', 296 290 => 'Lists (§5.4): 1-space-indent variations at top level - nesting indent rounded to nearest 2', 297 291 => 'Lists (§5.4): 1-space-indent variations on ordered list - nesting indent rounded to nearest 2', 298 292 => 'Lists (§5.4): marker-character change inside nested list - rewriter groups by u/o type only', 299 293 => 'Lists (§5.4): marker-character change with mixed indent - u/o-only grouping plus indent rounding', 300 294 => 'Lists (§5.4): lazy continuation across types - column-0 wrap plus marker splits not implemented', 301 295 => 'Lists (§5.4): lazy continuation in nested list - column-0 paragraph wrap not supported', 302 296 => 'Lists (§5.4): lazy continuation across blank line - lazy continuation plus loose/tight not implemented', 303 297 => 'Lists (§5.4): blank-line classification in nested list - strict loose/tight rules not implemented', 304 298 => 'Lists (§5.4): blank-line classification - strict loose/tight rules not implemented', 305 300 => 'Lists (§5.4): blank-line class with marker change - loose/tight plus marker splits not implemented', 306 301 => 'Lists (§5.4): blank-line classification plus marker-width - loose/tight plus extra-spaces-after-marker', 307 304 => 'Lists (§5.4): blank line between sub-list items - strict loose/tight rules not implemented', 308 305 => 'Lists (§5.4): blank line between deeply nested items - strict loose/tight rules not implemented', 309 306 => 'Lists (§5.4): blank line at end of loose list - strict loose/tight rules not implemented', 310 311 // ----------------------------------------------------------------------------------------------------------------- 312 // Backslash escapes (§6.1) 313 // 314 // These examples exercise escape behavior inside features DokuWiki we do not to support, such as 315 // raw HTML pass-through, link titles, reference-link definitions. 316 // ----------------------------------------------------------------------------------------------------------------- 317 318 317 => 'Backslash escapes (§6.1): escapes inside raw HTML - raw HTML pass-through not supported', 319 318 => 'Backslash escapes (§6.1): escapes in link title - title attribute discarded, no DW link slot', 320 319 => 'Backslash escapes (§6.1): in reference-link definition - forward-reference definitions not supported', 321 322 // ----------------------------------------------------------------------------------------------------------------- 323 // Entity refs (§6.2) 324 // 325 // These examples cross into raw HTML pass-through, link-title slots, strict URL rejection, or reference definitions 326 // — all features that DokuWiki does not implement for reasons documented in their own sections. 327 // ----------------------------------------------------------------------------------------------------------------- 328 329 327 => 'Entity refs (§6.2): raw HTML tag with entity in attribute - raw HTML pass-through not supported', 330 328 => 'Entity refs (§6.2): link with entity-decoded URL and title - title attribute discarded, no DW link slot', 331 329 => 'Entity refs (§6.2): reference link with entity-decoded URL - forward-reference definitions not supported', 332 337 => 'Entity refs (§6.2): decoded quote inside link URL - permissive URL slot, strict GFM rejection absent', 333 334 // ----------------------------------------------------------------------------------------------------------------- 335 // Code spans (§6.3) 336 // 337 // Cross-positional precedence between code spans and emphasis/links would need a pre-scan pass - our single-pass 338 // lexer matches leftmost-first and cannot reject an earlier opener because a later backtick span would consume its 339 // closer. 340 // ----------------------------------------------------------------------------------------------------------------- 341 342 351 => 'Code spans (§6.3): cross-position precedence vs. emphasis - leftmost-match in lexer, no pre-scan', 343 352 => 'Code spans (§6.3): span inside link label takes precedence - leftmost-match in lexer, no pre-scan', 344 354 => 'Code spans (§6.3): raw HTML tag pass-through - raw HTML pass-through not supported', 345 346 // ----------------------------------------------------------------------------------------------------------------- 347 // Emphasis (§6.4) 348 // 349 // DokuWiki's regex lexer uses leftmost-match and cannot apply CommonMark's left/right-flanking rules that 350 // distinguish word-chars, whitespace, and punctuation for * / _ delimiters, the multiple-of-3 rule for overlapping 351 // runs, the excess-drop logic for long delimiter runs, or balanced-pair analysis across nested delimiters. 352 // ----------------------------------------------------------------------------------------------------------------- 353 354 362 => 'Emphasis (§6.4): punctuation-adjacent * left/right flanking - flanking-delimiter analysis not implemented', 355 363 => 'Emphasis (§6.4): Unicode whitespace (U+00A0) flanking - lexer is ASCII-only, u-flag-aware regex needed', 356 368 => 'Emphasis (§6.4): punctuation-adjacent _ flanking - flanking-delimiter analysis not implemented', 357 372 => 'Emphasis (§6.4): intraword _ with punctuation inside - flanking-delimiter analysis not implemented', 358 376 => 'Emphasis (§6.4): bare * on next line should not pair - lone * taken as empty list marker, breaks paragraph', 359 377 => 'Emphasis (§6.4): * followed by ( as punctuation-adjacent - flanking-delimiter analysis not implemented', 360 378 => 'Emphasis (§6.4): nested *(*foo*)* with punctuation - flanking plus balanced-pair analysis not implemented', 361 382 => 'Emphasis (§6.4): nested _(_foo_)_ with punctuation - flanking plus balanced-pair analysis not implemented', 362 389 => 'Emphasis (§6.4): punctuation-adjacent ** flanking - flanking-delimiter analysis not implemented', 363 394 => 'Emphasis (§6.4): punctuation-adjacent __ flanking - flanking-delimiter analysis not implemented', 364 395 => 'Emphasis (§6.4): intraword __ left/right flanking - flanking-delimiter analysis not implemented', 365 396 => 'Emphasis (§6.4): intraword __ across digits (5__6__78) - flanking-delimiter analysis not implemented', 366 397 => 'Emphasis (§6.4): intraword __ with Cyrillic - flanking-delimiter analysis not implemented', 367 398 => 'Emphasis (§6.4): __foo, __bar__, baz__ flanking with pairing - flanking-delimiter analysis not implemented', 368 401 => 'Emphasis (§6.4): ** followed by ( as punctuation-adjacent - flanking-delimiter analysis not implemented', 369 404 => 'Emphasis (§6.4): nested *bar* inside **foo ... foo** - flanking-delimiter analysis not implemented', 370 407 => 'Emphasis (§6.4): __ followed by ( as punctuation-adjacent - flanking-delimiter analysis not implemented', 371 409 => 'Emphasis (§6.4): __foo__bar intraword close - flanking-delimiter analysis not implemented', 372 410 => 'Emphasis (§6.4): intraword __ with leading Cyrillic - flanking-delimiter analysis not implemented', 373 411 => 'Emphasis (§6.4): __foo__bar__baz__ multiple pairs - flanking-delimiter analysis not implemented', 374 412 => 'Emphasis (§6.4): __(bar)__ punctuation-adjacent - flanking-delimiter analysis not implemented', 375 416 => 'Emphasis (§6.4): overlapping _foo _bar_ baz_ - CommonMark rule 9 multiple-of-3 not implemented', 376 417 => 'Emphasis (§6.4): overlapping _ / __ with flanking - flanking plus multiple-of-3 not implemented', 377 418 => 'Emphasis (§6.4): overlapping *foo *bar** - multiple-of-3 rule not implemented', 378 419 => 'Emphasis (§6.4): nested *foo **bar** baz* - balanced-pair analysis not implemented', 379 421 => 'Emphasis (§6.4): overlapping *foo**bar* - multiple-of-3 rule not implemented', 380 422 => 'Emphasis (§6.4): nested ***foo** bar* - triple-delimiter analysis not implemented', 381 423 => 'Emphasis (§6.4): nested *foo **bar*** - triple-delimiter analysis not implemented', 382 424 => 'Emphasis (§6.4): nested *foo**bar*** - triple-delimiter analysis not implemented', 383 425 => 'Emphasis (§6.4): triple foo***bar***baz - triple-delimiter analysis not implemented', 384 426 => 'Emphasis (§6.4): long delimiter runs of mixed lengths - excess-drop logic not implemented', 385 427 => 'Emphasis (§6.4): deeply nested *foo **bar *baz* bim** bop* - balanced-pair analysis not implemented', 386 428 => 'Emphasis (§6.4): inside link label *foo [*bar*](/url)* - link label is flat string, not re-tokenized', 387 434 => 'Emphasis (§6.4): overlapping __foo __bar__ baz__ - multiple-of-3 rule not implemented', 388 435 => 'Emphasis (§6.4): ____foo__ bar__ leading long run - excess-drop logic not implemented', 389 436 => 'Emphasis (§6.4): **foo **bar**** trailing long run - excess-drop logic not implemented', 390 439 => 'Emphasis (§6.4): nested ***foo* bar** - triple-delimiter analysis not implemented', 391 440 => 'Emphasis (§6.4): nested **foo *bar*** - triple-delimiter analysis not implemented', 392 441 => 'Emphasis (§6.4): deeply nested **foo *bar **baz** bim* bop** - balanced-pair analysis not implemented', 393 442 => 'Emphasis (§6.4): inside link label **foo [*bar*](/url)** - link label is flat string, not re-tokenized', 394 463 => 'Emphasis (§6.4): __foo_ mixed _ / __ pairing - flanking-delimiter analysis not implemented', 395 464 => 'Emphasis (§6.4): _foo__ mixed _ / __ pairing - flanking-delimiter analysis not implemented', 396 465 => 'Emphasis (§6.4): ___foo__ run-length analysis - flanking plus run-length analysis not implemented', 397 466 => 'Emphasis (§6.4): ____foo_ run-length analysis - flanking plus run-length analysis not implemented', 398 467 => 'Emphasis (§6.4): __foo___ run-length analysis - flanking plus run-length analysis not implemented', 399 468 => 'Emphasis (§6.4): _foo____ run-length analysis - flanking plus run-length analysis not implemented', 400 470 => 'Emphasis (§6.4): nested *_foo_* - balanced-pair analysis not implemented', 401 472 => 'Emphasis (§6.4): nested _*foo*_ - balanced-pair analysis not implemented', 402 473 => 'Emphasis (§6.4): ****foo**** excess-drop (4+4 to strong) - excess-drop logic not implemented', 403 474 => 'Emphasis (§6.4): ____foo____ excess-drop (4+4 to strong) - excess-drop logic not implemented', 404 475 => 'Emphasis (§6.4): ******foo****** excess-drop (6+6 to strong) - excess-drop logic not implemented', 405 477 => 'Emphasis (§6.4): _____foo_____ excess-drop (5+5 to em+strong) - excess-drop logic not implemented', 406 478 => 'Emphasis (§6.4): *foo _bar* baz_ overlapping different - flanking plus balanced-pair not implemented', 407 479 => 'Emphasis (§6.4): *foo __bar *baz bim__ bam* crossing - flanking plus balanced-pair not implemented', 408 480 => 'Emphasis (§6.4): **foo **bar baz** overlapping same - flanking plus balanced-pair not implemented', 409 482 => 'Emphasis (§6.4): crossing link boundary *[bar*](/url) - leftmost-match cannot reject opener crossing link', 410 483 => 'Emphasis (§6.4): crossing link _foo [bar_](/url) - leftmost-match cannot reject opener crossing link', 411 484 => 'Emphasis (§6.4): raw HTML <img/> adjacent to * - raw HTML pass-through not supported', 412 485 => 'Emphasis (§6.4): raw HTML <a href="**"> adjacent to ** - raw HTML pass-through not supported', 413 486 => 'Emphasis (§6.4): raw HTML <a href="__"> adjacent to __ - raw HTML pass-through not supported', 414 489 => 'Emphasis (§6.4): vs angle-bracket autolink with ** inside URL - leftmost-match cannot reorder spans', 415 490 => 'Emphasis (§6.4): vs angle-bracket autolink with __ inside URL - leftmost-match cannot reorder spans', 416 417 // ----------------------------------------------------------------------------------------------------------------- 418 // Links (§6.6) 419 // 420 // GfmLink deliberately does not implement several link features: 421 // 422 // - Title attribute ("title" / 'title' / (title) after the URL). Parses cleanly but is discarded — DokuWiki link 423 // instructions have no title slot, and plumbing one through every renderer is out of scope. 424 // - Pointy-bracket destinations <...>. Rarely used; regex cost and interaction with raw-HTML detection outweigh 425 // the benefit. 426 // - Balanced parentheses inside URL destinations. 427 // - Strict GFM URL rejection (e.g. unquoted whitespace, decoded quote inside URL). GfmLink uses a permissive URL 428 // slot. 429 // - Nested brackets in link labels — single-pass lexer cannot resolve, label class forbids brackets so outer 430 // match fails. 431 // - Inline formatting inside link labels — label is taken as a flat string and not re-tokenized. 432 // - Reference links ([text][id], [text][], [foo] with matching definition). Forward references would require a 433 // two-pass parse; only inline links [text](url) are supported. 434 // ----------------------------------------------------------------------------------------------------------------- 435 436 493 => 'Links (§6.6): link with title attribute - title slot not supported by DW link instructions', 437 495 => 'Links (§6.6): empty URL destination [link]() - GfmLink pattern requires non-empty URL', 438 496 => 'Links (§6.6): pointy-bracket link destination - not supported, regex cost outweighs benefit', 439 497 => 'Links (§6.6): unquoted whitespace in URL slot - strict GFM URL rejection not implemented', 440 498 => 'Links (§6.6): pointy-bracket destination with spaces - not supported', 441 500 => 'Links (§6.6): pointy-bracket destination with newline - not supported', 442 501 => 'Links (§6.6): pointy-bracket destination containing ) - not supported', 443 502 => 'Links (§6.6): pointy-bracket destination with trailing backslash - not supported', 444 503 => 'Links (§6.6): malformed pointy-bracket destinations - not supported', 445 505 => 'Links (§6.6): balanced parens inside URL destination - regex single-level only', 446 507 => 'Links (§6.6): pointy-bracket wrapping unbalanced parens - not supported', 447 512 => 'Links (§6.6): destination that parses as title - edge case not supported', 448 513 => 'Links (§6.6): three quoting styles for link title - title slot not supported', 449 514 => 'Links (§6.6): title with HTML-entity escape - title slot not supported', 450 515 => 'Links (§6.6): title separated by non-breaking space - title slot not supported', 451 516 => 'Links (§6.6): title with nested balanced quotes - Markdown.pl quirk, not supported', 452 517 => 'Links (§6.6): title with different inner quote type - title slot not supported', 453 518 => 'Links (§6.6): multi-line link title - title slot not supported', 454 520 => 'Links (§6.6): label with literal nested brackets - label class forbids brackets, outer match fails', 455 522 => 'Links (§6.6): nested bracket forms inner link only - lexer cannot resolve nested labels', 456 524 => 'Links (§6.6): inline formatting inside link label - label is flat string, not re-tokenized', 457 526 => 'Links (§6.6): nested links - inner link matches, outer falls back to literal', 458 527 => 'Links (§6.6): nested links inside emphasis - leftmost-match cannot resolve nesting', 459 528 => 'Links (§6.6): image-as-alt with nested link - alt class forbids brackets, outer image fails', 460 529 => 'Links (§6.6): link text grouping vs emphasis - leftmost-match cannot override', 461 530 => 'Links (§6.6): emphasis/bracket crossing - leftmost-match cannot override', 462 532 => 'Links (§6.6): raw HTML inside link text - raw HTML pass-through not supported', 463 533 => 'Links (§6.6): code span inside link text - requires pre-scan pass for cross-position precedence', 464 534 => 'Links (§6.6): autolink inside link text - angle-bracket autolinks not supported', 465 535 => 'Links (§6.6): reference link [foo][bar] - forward-reference definitions not supported', 466 536 => 'Links (§6.6): reference link with emphasis in text - forward-reference definitions not supported', 467 537 => 'Links (§6.6): reference link with multi-line text - forward-reference definitions not supported', 468 538 => 'Links (§6.6): reference link case-insensitive label - forward-reference definitions not supported', 469 539 => 'Links (§6.6): reference link whitespace-collapsed label - forward-reference definitions not supported', 470 540 => 'Links (§6.6): reference link with multi-word label - forward-reference definitions not supported', 471 541 => 'Links (§6.6): reference link case-insensitive Unicode - forward-reference definitions not supported', 472 542 => 'Links (§6.6): reference link with whitespace before label - forward-reference definitions not supported', 473 543 => 'Links (§6.6): reference link with whitespace inside brackets - forward-reference definitions not supported', 474 544 => 'Links (§6.6): reference link no whitespace before label - forward-reference definitions not supported', 475 545 => 'Links (§6.6): reference link first def wins on duplicate - forward-reference definitions not supported', 476 546 => 'Links (§6.6): reference link with backslash in label - forward-reference definitions not supported', 477 547 => 'Links (§6.6): reference link inline content not parsed - forward-reference definitions not supported', 478 548 => 'Links (§6.6): reference link does not interrupt sentences - forward-reference definitions not supported', 479 549 => 'Links (§6.6): reference link with empty inner label - forward-reference definitions not supported', 480 550 => 'Links (§6.6): reference link [foo][] collapsed form - forward-reference definitions not supported', 481 551 => 'Links (§6.6): reference link with bracketed text - forward-reference definitions not supported', 482 552 => 'Links (§6.6): reference link with whitespace at boundary - forward-reference definitions not supported', 483 553 => 'Links (§6.6): reference link with newline between - forward-reference definitions not supported', 484 557 => 'Links (§6.6): reference link with newline-separated label - forward-reference definitions not supported', 485 558 => 'Links (§6.6): reference link newline-separated variant - forward-reference definitions not supported', 486 560 => 'Links (§6.6): reference link with literal [] - forward-reference definitions not supported', 487 561 => 'Links (§6.6): collapsed reference link [foo][] - forward-reference definitions not supported', 488 562 => 'Links (§6.6): collapsed reference link with emphasis - forward-reference definitions not supported', 489 563 => 'Links (§6.6): collapsed reference link case-insensitive - forward-reference definitions not supported', 490 564 => 'Links (§6.6): collapsed reference link with newline - forward-reference definitions not supported', 491 565 => 'Links (§6.6): shortcut reference link [foo] - forward-reference definitions not supported', 492 566 => 'Links (§6.6): shortcut reference link with emphasis - forward-reference definitions not supported', 493 567 => 'Links (§6.6): shortcut reference link with whitespace label - forward-reference definitions not supported', 494 568 => 'Links (§6.6): shortcut reference link with multi-word label - forward-reference definitions not supported', 495 569 => 'Links (§6.6): shortcut reference link case-insensitive - forward-reference definitions not supported', 496 570 => 'Links (§6.6): shortcut reference link with whitespace - forward-reference definitions not supported', 497 571 => 'Links (§6.6): shortcut reference link with backslash escape - forward-reference definitions not supported', 498 572 => 'Links (§6.6): shortcut reference link with emphasis in label - forward-reference definitions not supported', 499 573 => 'Links (§6.6): reference link with literal [foo] - forward-reference definitions not supported', 500 574 => 'Links (§6.6): reference link with double bracket [[foo]] - forward-reference definitions not supported', 501 575 => 'Links (§6.6): reference link inside paragraph - forward-reference definitions not supported', 502 576 => 'Links (§6.6): reference link multi-instance - forward-reference definitions not supported', 503 577 => 'Links (§6.6): reference link collapsed-form fallback - forward-reference definitions not supported', 504 578 => 'Links (§6.6): reference link shortcut-form fallback - forward-reference definitions not supported', 505 579 => 'Links (§6.6): reference link full-form fallback - forward-reference definitions not supported', 506 507 // ----------------------------------------------------------------------------------------------------------------- 508 // Images (§6.7) 509 // 510 // We don't have a title slot or support forward references 511 // ----------------------------------------------------------------------------------------------------------------- 512 513 580 => 'Images (§6.7): image with title attribute - title slot not supported by DW link instructions', 514 581 => 'Images (§6.7): reference-style image - forward-reference definitions not supported', 515 582 => 'Images (§6.7): nested image-in-image alt - alt forbids brackets, leftmost-match cannot reorder', 516 583 => 'Images (§6.7): link inside image alt - alt forbids brackets, leftmost-match cannot reorder', 517 584 => 'Images (§6.7): collapsed reference-style image - forward-reference definitions not supported', 518 585 => 'Images (§6.7): full reference-style image - forward-reference definitions not supported', 519 587 => 'Images (§6.7): image with title attribute variant - title slot not supported', 520 588 => 'Images (§6.7): pointy-bracket image destination - not supported, same as link pointy-brackets', 521 590 => 'Images (§6.7): reference-style image with label match - forward-reference definitions not supported', 522 591 => 'Images (§6.7): reference-style image case-insensitive - forward-reference definitions not supported', 523 592 => 'Images (§6.7): collapsed reference-style image ![foo][] - forward-reference definitions not supported', 524 593 => 'Images (§6.7): collapsed reference-style image with emphasis - forward-reference definitions not supported', 525 594 => 'Images (§6.7): collapsed reference-style case-insensitive - forward-reference definitions not supported', 526 595 => 'Images (§6.7): reference-style image with whitespace - forward-reference definitions not supported', 527 596 => 'Images (§6.7): shortcut reference-style image ![foo] - forward-reference definitions not supported', 528 597 => 'Images (§6.7): shortcut reference-style image with emphasis - forward-reference definitions not supported', 529 598 => 'Images (§6.7): image with unescaped nested brackets - literal-fallback behavior not supported', 530 599 => 'Images (§6.7): shortcut reference-style case-insensitive - forward-reference definitions not supported', 531 600 => 'Images (§6.7): image-via-reference fallback !\[foo] - forward-reference definitions not supported', 532 601 => 'Images (§6.7): image-via-reference fallback \![foo] - forward-reference definitions not supported', 533 534 // ----------------------------------------------------------------------------------------------------------------- 535 // Autolinks (§6.8) 536 // 537 // Externallink builds one regex per scheme listed in conf/scheme.conf, and only the schemes in that allow-list are 538 // recognised as bare-URL autolinks. Schemes outside the allow-list (mailto, made-up schemes, localhost) fall 539 // through to default escaping and the URL is emitted as literal text 540 // ----------------------------------------------------------------------------------------------------------------- 541 542 605 => 'Autolinks (§6.8): angle-bracket autolink with MAILTO: - mailto not in conf/scheme.conf default allow-list', 543 606 => 'Autolinks (§6.8): angle-bracket autolink with a+b+c scheme - scheme not in conf/scheme.conf allow-list', 544 607 => 'Autolinks (§6.8): angle-bracket autolink with made-up scheme - scheme not in conf/scheme.conf allow-list', 545 609 => 'Autolinks (§6.8): angle-bracket with localhost:5001 - localhost not in conf/scheme.conf allow-list', 546 547 // ----------------------------------------------------------------------------------------------------------------- 548 // Raw HTML (§6.10) 549 // 550 // We do not support raw HTML pass-through at all. 551 // ----------------------------------------------------------------------------------------------------------------- 552 553 632 => 'Raw HTML (§6.10): open tag - pass-through not supported', 554 633 => 'Raw HTML (§6.10): closing tag - pass-through not supported', 555 634 => 'Raw HTML (§6.10): tag with multi-line attributes - pass-through not supported', 556 635 => 'Raw HTML (§6.10): tag with line breaks in attributes - pass-through not supported', 557 636 => 'Raw HTML (§6.10): tag with custom name and attributes - pass-through not supported', 558 638 => 'Raw HTML (§6.10): tag with illegal attribute names - pass-through not supported', 559 639 => 'Raw HTML (§6.10): tag with illegal attribute values - pass-through not supported', 560 641 => 'Raw HTML (§6.10): open and closing tags pair - pass-through not supported', 561 642 => 'Raw HTML (§6.10): HTML comment - pass-through not supported', 562 643 => 'Raw HTML (§6.10): invalid comment - pass-through not supported', 563 644 => 'Raw HTML (§6.10): processing instruction - pass-through not supported', 564 645 => 'Raw HTML (§6.10): declaration - pass-through not supported', 565 646 => 'Raw HTML (§6.10): declaration with single-letter name - pass-through not supported', 566 647 => 'Raw HTML (§6.10): EMPTY declaration - pass-through not supported', 567 648 => 'Raw HTML (§6.10): CDATA section - pass-through not supported', 568 649 => 'Raw HTML (§6.10): tag with entity ref in attribute - pass-through not supported', 569 650 => 'Raw HTML (§6.10): tag with backslash in attribute - pass-through not supported', 570 651 => 'Raw HTML (§6.10): tag with entity quote in attribute - pass-through not supported', 571 572 // ----------------------------------------------------------------------------------------------------------------- 573 // Raw HTML (§6.11) 574 // 575 // The Disallowed Raw HTML extension is a filter on top of raw HTML pass-through. DokuWiki escapes raw HTML by 576 // policy, so the filter has no input to operate on. 577 // ----------------------------------------------------------------------------------------------------------------- 578 579 652 => 'Raw HTML (§6.11): disallowed-tag filter on output - DW escapes raw HTML by policy, filter has no input', 580 581 // ----------------------------------------------------------------------------------------------------------------- 582 // Hard breaks (§6.12) 583 // 584 // The skipped cases sit inside raw HTML tags, which DokuWiki does not pass through by default. 585 // ----------------------------------------------------------------------------------------------------------------- 586 587 662 => 'Hard breaks (§6.12): inside raw HTML tag - raw HTML pass-through not supported', 588 663 => 'Hard breaks (§6.12): backslash form inside raw HTML tag - raw HTML pass-through not supported', 589 590]; 591