Page MenuHomePhabricator

AutoWikiBrowser introducing erroneous line breaks
Open, Needs TriagePublic

Description

I've noticed two different instances recently in which the GENFIXes done by AWB have introduced line break errors.

The first was related to a transcluded section, where, it's necessary to have only a single line break afterwards, or else an extra space is created. AWB added an erroneous extra line break, creating a gap.

The second instance was caused by the existence of a hidden comment at the end of a section. Again, AWB created an extra line break (between the history and campus sections).

Given how widely GENFIXes are applied, any bugs it introduces seem cause for concern.

Event Timeline

First: transcluded section. After a discussion on AWB talk page the page was updated with a template so I assume that's no longer an issue.

Second (comment then heading): no clear way to handle this within what AWB currently does: the headings spacing code runs after applying "hiding" to parts of the wiki text we shouldn't change such as image links, URLs, quotes and comments. So at the point the headings code runs it will see "something hidden" then one newline then a heading, so we can't tell that the something hidden is a comment (so don't change line spacing) rather than something else (e.g. a template so do change line spacing).