NovemLinguae / UserScripts

Novem Linguae's Wikipedia user scripts
https://en.wikipedia.org/wiki/User:Novem_Linguae/Templates/Scripts
3 stars 1 forks source link

DraftCleaner - Don't bold the article's title if it isn't the lead section #154

Open MPGuy2824 opened 1 year ago

MPGuy2824 commented 1 year ago

e.g. in https://en.wikipedia.org/wiki/K._Lakkappa the script wanted to bold the name in the "Early life and background" section.

NovemLinguae commented 1 year ago

This one is a rare edge case, since the bolded title does not match the article title, then the article title also happens to be located in the second paragraph.

I guess the fix is either to abort if any bold is detected, or to correctly detect the first paragraph and only touch that.

image image