User:Franamax/Preview refs

This proposed change to MediaWiki will allow editors to optionally preview the formatted output of tags when editing sections of articles.

Overview
The MediaWiki (MW) Cite extension allows footnoting to attribute sources and add notes, where source information is enclosed in tags and the tag is placed later in the page to format and output all the accumulated references, as shown here:

For most articles, the tag is placed in a separate section, near the bottom of the article. When editing an entire page, the formatted output can be previewed and checked for errors, however the preferred mode of editing is per-section. When previewing a section, there is currently no method to check the references for errors, instead the section must be saved and the entire article redisplayed to check for reference errors. Alternatively, a tag or reflist template can be placed temporarily in the section for preview purposes. Both these methods are time-consuming and error-prone.

We propose addition of an optional check-box on the edit screen which will cause the Preview function to duplicate the functionality of temporarily adding the reflist template.

Known limitations
Named references defined elsewhere in the article (with and referred in the section being previewed will generate an error message. It is not feasible to scan the entire article for all references, due to prograsmming complexity and increased parsing time for large pages. Instead, an informational note will be shown instead of an error message. There is still a possibility that an editor may misspell a reference name.