Commit 49364b0
tools: update JSON header parsing for backticks
Methods, events, and so on in headers in our documentation may (and
should) be set off with backticks in the raw markdown. When that
happens, the headers is misinterpreted by tools/json.js as not being a
method or event. Update the JSON tool generator to accommodate backticks
in this situation and add a test for this situation.
Fixes: #31290
PR-URL: #31294
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>1 parent 2285936 commit 49364b0Copy full SHA for 49364b0
File tree
Expand file treeCollapse file tree
3 files changed
+92
-7
lines changedOpen diff view settings
Filter options
- test
- doctool
- fixtures
- tools/doc
Expand file treeCollapse file tree
3 files changed
+92
-7
lines changedOpen diff view settings
Collapse file
test/doctool/test-doctool-json.js
Copy file name to clipboardExpand all lines: test/doctool/test-doctool-json.js+68Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
157 | 157 | |
158 | 158 | |
159 | 159 | |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
160 | 228 | |
161 | 229 | |
162 | 230 | |
|
Collapse file
test/fixtures/doc_with_backticks_in_headings.md
Copy file name to clipboard+13Lines changed: 13 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
Collapse file
+11-7Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
435 | 435 | |
436 | 436 | |
437 | 437 | |
438 | | - |
| 438 | + |
439 | 439 | |
440 | 440 | |
441 | 441 | |
442 | 442 | |
443 | 443 | |
444 | 444 | |
| 445 | + |
| 446 | + |
445 | 447 | |
446 | 448 | |
447 | 449 | |
| ||
458 | 460 | |
459 | 461 | |
460 | 462 | |
| 463 | + |
461 | 464 | |
462 | 465 | |
463 | | - |
| 466 | + |
464 | 467 | |
465 | 468 | |
466 | | - |
| 469 | + |
467 | 470 | |
468 | 471 | |
469 | | - |
| 472 | + |
470 | 473 | |
471 | 474 | |
472 | | - |
| 475 | + |
473 | 476 | |
474 | 477 | |
475 | | - |
| 478 | + |
476 | 479 | |
477 | 480 | |
478 | | - |
| 481 | + |
479 | 482 | |
| 483 | + |
480 | 484 | |
481 | 485 | |
482 | 486 | |
|
0 commit comments