Commit de98ece
committed
Skip auto-injection if a manual "See also" section already exists
Pre-render check in the client-side JS: scan the article body for any
H2-H4 heading whose text matches "See also" (case-insensitive, optional
trailing : or .) and bail out before fetching/rendering the auto recs.
This addresses the duplicate-section concern raised by p-amyjiang on
the PR -- about 57 wiki articles already ship a manually written
See also list, and they should keep authorial curation untouched.
The auto-injected `.sa-heading` is excluded from the detector so the
guard stays idempotent if the script ever re-runs on the same DOM.1 parent 86daddd commit de98ece
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
10 | 24 | | |
11 | 25 | | |
12 | 26 | | |
| |||
0 commit comments