HomeGitPull.it

improve "Voci correlate" parser to allow the link to be nearby EOF

Description

improve "Voci correlate" parser to allow the link to be nearby EOF

Before this change, only this was allowed, to remove Peppino:

== Voci correlate ==
* [[Peppetta]]
* [[Peppino]] <--
* [[Peppina]]

After this change, also this case is considered:

== Voci correlate ==
* [[Peppetta]]
* [[Peppina]]
* [[Peppino]](no newline here - just EOF)<--
NOTE: This was already working in cases where the page was ending with a newline. But, for some reasons now it's very frequent to have not a newline there. If you are aware of the specific change in MediaWiki that now trims newlines out of the wikitext, please report to us thanks.
NOTE: This still does not clear the section if empty, but it's one step in that direction.

Ref https://phabricator.wikimedia.org/T338084

Details

Provenance
valerio.bozzolanAuthored on Jun 5 2023, 08:40
Parents
R30:1205ea953db0: improve debug and warning messages
Branches
Unknown
Tags
Unknown