Commit 5a14e3e
committed
Move heading-related rules before headings
i.e. this replaces
```markdown
# UwU
r[uwu]
```
with
```markdown
r[uwu]
# UwU
```
This is required because the new grid system assumes that a rule is
related to the *following* element. But also, it makes it clear in the
source which element the rule is related to, as it's curently ambiguous.
Also (2), existing annotations are not 100% consistent.
I've done this using the following two irregular "regex" replacements:
1. `([^\]]\n|^(?<!\n))(^#+ [^\n]+)\n\n?(r\[.+\])\n*(r\[)`
==>> `$1$3\n$2\n\n$4` (~255 cases)
2. `([^\]]\n|^(?<!\n))(^#+ [^\n]+)\n\n?(r\[.+\])\n+`
==>> `$1$3\n$2\n\n` (~99 cases)
With the latter one being reviewed manually, since it can produce bad
replacements in cases like this, where the rule relates to the following
paragraph/element, rather than the preceding heading:
```markdown
# OwO
r[meow]
>////< mEeoowW prRRrr purrrrrrRr :3 mrrrrrreww meEooww purrrrrr~ Mrrrew
```1 parent 7575dc3 commit 5a14e3e
File tree
69 files changed
+387
-686
lines changed- src
- attributes
- items
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+387
-686
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | 108 | | |
| 109 | + | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
| |||
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | | - | |
192 | | - | |
193 | 190 | | |
| 191 | + | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
201 | 199 | | |
202 | 200 | | |
203 | 201 | | |
204 | | - | |
205 | | - | |
206 | 202 | | |
| 203 | + | |
207 | 204 | | |
208 | 205 | | |
209 | 206 | | |
| |||
234 | 231 | | |
235 | 232 | | |
236 | 233 | | |
237 | | - | |
238 | | - | |
239 | 234 | | |
| 235 | + | |
240 | 236 | | |
241 | 237 | | |
242 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | 7 | | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | 21 | | |
| 22 | + | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
62 | | - | |
63 | | - | |
64 | 60 | | |
| 61 | + | |
65 | 62 | | |
66 | 63 | | |
67 | 64 | | |
| |||
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
| 90 | + | |
93 | 91 | | |
94 | 92 | | |
95 | | - | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
| 96 | + | |
99 | 97 | | |
100 | 98 | | |
101 | | - | |
102 | 99 | | |
103 | 100 | | |
104 | 101 | | |
| |||
165 | 162 | | |
166 | 163 | | |
167 | 164 | | |
| 165 | + | |
168 | 166 | | |
169 | 167 | | |
170 | | - | |
171 | 168 | | |
172 | 169 | | |
173 | 170 | | |
| |||
230 | 227 | | |
231 | 228 | | |
232 | 229 | | |
| 230 | + | |
233 | 231 | | |
234 | 232 | | |
235 | | - | |
236 | 233 | | |
237 | 234 | | |
238 | 235 | | |
| |||
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
| 292 | + | |
295 | 293 | | |
296 | 294 | | |
297 | | - | |
298 | 295 | | |
299 | 296 | | |
300 | 297 | | |
| |||
327 | 324 | | |
328 | 325 | | |
329 | 326 | | |
330 | | - | |
331 | | - | |
332 | 327 | | |
| 328 | + | |
333 | 329 | | |
334 | 330 | | |
335 | 331 | | |
| |||
346 | 342 | | |
347 | 343 | | |
348 | 344 | | |
349 | | - | |
350 | | - | |
351 | 345 | | |
| 346 | + | |
352 | 347 | | |
353 | 348 | | |
354 | 349 | | |
| |||
364 | 359 | | |
365 | 360 | | |
366 | 361 | | |
| 362 | + | |
367 | 363 | | |
368 | 364 | | |
369 | | - | |
370 | 365 | | |
371 | 366 | | |
372 | 367 | | |
| |||
444 | 439 | | |
445 | 440 | | |
446 | 441 | | |
447 | | - | |
448 | | - | |
449 | 442 | | |
| 443 | + | |
450 | 444 | | |
451 | 445 | | |
452 | 446 | | |
| |||
480 | 474 | | |
481 | 475 | | |
482 | 476 | | |
483 | | - | |
484 | | - | |
485 | 477 | | |
| 478 | + | |
486 | 479 | | |
487 | 480 | | |
488 | 481 | | |
| |||
498 | 491 | | |
499 | 492 | | |
500 | 493 | | |
| 494 | + | |
501 | 495 | | |
502 | 496 | | |
503 | | - | |
504 | 497 | | |
505 | 498 | | |
506 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | 7 | | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | | - | |
20 | 17 | | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | 83 | | |
| 84 | + | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
| |||
156 | 153 | | |
157 | 154 | | |
158 | 155 | | |
159 | | - | |
160 | | - | |
161 | 156 | | |
| 157 | + | |
162 | 158 | | |
163 | 159 | | |
164 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
9 | | - | |
10 | 7 | | |
| 8 | + | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
| 105 | + | |
107 | 106 | | |
108 | 107 | | |
109 | | - | |
110 | 108 | | |
111 | 109 | | |
112 | 110 | | |
| |||
141 | 139 | | |
142 | 140 | | |
143 | 141 | | |
144 | | - | |
145 | | - | |
146 | 142 | | |
| 143 | + | |
147 | 144 | | |
148 | 145 | | |
149 | 146 | | |
| |||
228 | 225 | | |
229 | 226 | | |
230 | 227 | | |
| 228 | + | |
231 | 229 | | |
232 | 230 | | |
233 | | - | |
234 | 231 | | |
235 | 232 | | |
236 | 233 | | |
| |||
269 | 266 | | |
270 | 267 | | |
271 | 268 | | |
272 | | - | |
273 | | - | |
274 | 269 | | |
| 270 | + | |
275 | 271 | | |
276 | 272 | | |
277 | 273 | | |
| |||
303 | 299 | | |
304 | 300 | | |
305 | 301 | | |
306 | | - | |
307 | | - | |
308 | 302 | | |
| 303 | + | |
309 | 304 | | |
310 | 305 | | |
311 | 306 | | |
| |||
350 | 345 | | |
351 | 346 | | |
352 | 347 | | |
353 | | - | |
354 | | - | |
355 | 348 | | |
| 349 | + | |
356 | 350 | | |
357 | 351 | | |
358 | 352 | | |
| |||
469 | 463 | | |
470 | 464 | | |
471 | 465 | | |
472 | | - | |
473 | | - | |
474 | 466 | | |
| 467 | + | |
475 | 468 | | |
476 | 469 | | |
477 | 470 | | |
| |||
482 | 475 | | |
483 | 476 | | |
484 | 477 | | |
485 | | - | |
486 | | - | |
487 | 478 | | |
| 479 | + | |
488 | 480 | | |
489 | 481 | | |
490 | 482 | | |
| |||
0 commit comments