Page MenuHomePhabricator

Markup inside <references> tag is not highlighted in CodeMirror
Closed, ResolvedPublic


As reported on plwikipedia, the syntax highlighter ignores any markup contained within a <references> tag, specifically when this element is used to store a list of <ref>s. It is a common practice among several users to transfer all <ref> contents from the main text into a <references> (or similar) container, usually at the end of the article for clarity and organization purposes. Plwiki has long enforced the use of a {{przypisy}} template which basically hides <references> from the editor's sight while still allowing to pass a list of <ref> tags in its first parameter, in which case the syntax highlighting works nicely (example, check the "Przypisy" section). However, the plwiki community is now considering to spread the usage of raw HTML tags instead, and the highlighter has occurred to fail (example) where {{przypisy}} did not.

Related: T163238.

Event Timeline

Change 735369 had a related patch set uploaded (by Peter Bowman; author: Peter Bowman):

[mediawiki/extensions/Cite@master] Highlight markup inside <references> in CodeMirror

For what it's worth I've reviewed this and I think this patch can be applied. It's a simple patch. At worst it might not work for all cases, but will at least be better. Could someone merge this? Thanks.

Change 735369 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Highlight markup inside <references> in CodeMirror

Umherirrender assigned this task to PeterBowman.
Umherirrender removed a project: Patch-For-Review.