Commit 956fbd6
Rely on HeadingPFragment to set the index when inTemplate
Many tests are made metadata/integrated which will run in both the
legacy parser and Parsoid in integrated mode.
A test is added for T387374#12059186 to show that if a template subsumes
a non-templated region with headings, the headings will still be given
the appropriate indices.
A test is added for T384490#10731504 to show that if the preprocessor
didn't assign an index for a heading because it was on a line with
leading or trailing include directives, Parsoid doesn't fill it in
post-expansion.
A test is added for T387520#10985986 to show that if the preprocessor
didn't assign an index for a heading because it was from a parser
function returning wikitext, Parsoid doesn't fill it in post-expansion.
A test could be written for T387521#12060718 where a heading is
generated by a Scribunto module and not assigned an index in the
preprocessor but Parsoid was filling one in, but it seems the same in
kind as the above and belongs more in the extension's repo if anything.
Bug: T430367
Bug: T387374
Change-Id: I377e4cb8effd43ec19d891c6104973acbca14a261 parent 75e1c4e commit 956fbd6
7 files changed
Lines changed: 469 additions & 396 deletions
File tree
- src
- Fragments
- Wt2Html
- DOM/Processors
- tests/parser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 93 | + | |
102 | 94 | | |
103 | 95 | | |
104 | 96 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 97 | + | |
144 | 98 | | |
145 | 99 | | |
146 | 100 | | |
| |||
149 | 103 | | |
150 | 104 | | |
151 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
152 | 112 | | |
153 | 113 | | |
154 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| 539 | + | |
539 | 540 | | |
540 | 541 | | |
541 | 542 | | |
| |||
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
603 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
604 | 609 | | |
605 | 610 | | |
606 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
607 | 617 | | |
608 | 618 | | |
609 | 619 | | |
| |||
1088 | 1098 | | |
1089 | 1099 | | |
1090 | 1100 | | |
1091 | | - | |
| 1101 | + | |
1092 | 1102 | | |
1093 | 1103 | | |
1094 | | - | |
| 1104 | + | |
1095 | 1105 | | |
1096 | 1106 | | |
1097 | 1107 | | |
| |||
0 commit comments