The highlighting of source code on https://www.mediawiki.org/w/index.php?title=Extension:QuestyCaptcha&oldid=1650379 seems to be broken. Also, it works fine when in 'Edit' mode (using VE).
Description
Details
Revisions and Commits
rESHG extension-SyntaxHighlight_GeSHi | |||
rESHG040b74e4dd7c Refactor final output formatting | |||
rESHGf03e1a40d97d Refactor final output formatting | |||
rESHGc4a921dc54fd Refactor final output formatting | |||
rESHG9dc21a03fe3e Refactor final output formatting | |||
rESHGe5b543d9d5ff Refactor final output formatting | |||
rESHG08635d42fb46 Refactor final output formatting | |||
rESHG6f81a56d771c Refactor final output formatting | |||
rESHGf606a4f27079 Refactor final output formatting | |||
rESHG043969f84eb5 Refactor final output formatting | |||
rMEXT MediaWiki Extensions | |||
rMEXT5758b1fd611e Updated mediawiki/extensions Project… |
Related Objects
- Mentioned In
- T70466: Add parser test for multiline <pre> or <syntaxhighlight> elements inside a dd element created by ":"
T25674: enclose="none" clashes with the Wiki markup for lists
T17333: <source> tag cannot be rendered correctly when more than one tags are in the same line - Mentioned Here
- T70466: Add parser test for multiline <pre> or <syntaxhighlight> elements inside a dd element created by ":"
Event Timeline
I was able to fix it by making this edit. Looks like it doesn't work properly if there is no linebreak before the source tag.
I would blame the list syntax, not the newlines. This is probably some new exciting Tidy behavior we're running into. Perhaps we render some whitespace differently, or perhaps the wrapper tags are different, or perhaps something else…
This works correctly:
foo <source>a b</source>
These don't:
* <source>a b</source> * foo<source>a b</source> * foo <source>a b</source>
It has alwasy broken inside a list item wihtout the enclose=div option (which was a hack in itself). We should make it a good habit of no longer using it inside a wikilist item. Other then that, wether it is Tidy or the parser getting confused (I'd have to test using ExpandTemplates), the extension should always treat it as a new block context.
I would prefer T70466: Add parser test for multiline <pre> or <syntaxhighlight> elements inside a dd element created by ":", to suport better the usage of these elements inside of lists.
The problem is that wiki list items are single line entities; a linebreak terminates them. They cannot contain multi-line elements of any kind wihtout changing the fundamentals of the parser.
Example:
After the ResourceLoader section, the "Security patches" section has a notably larger font. This is because the body container's DIV element ended up being closed and as such the flow is no longer valid.
Wikitext:
The Resource Loader (RL) and l10n
In the case of a locaization update that affects JavaScript and is loaded via the [[mw:ResourceLoader|ResourceLoader]] the live string may remain unchanged after running scap; troubleshooting steps follow:
- Check <code>/MediaWiki:<string-key></code> on the wiki in question to see if the string has been updated, e.g. to check the <code>popups-send-feedback</code> string (from the [[mw:Extension:Popups|Popups extension]]) on enwiki visit <code>https://en.wikipedia.org/wiki/MediaWiki:Popups-send-feedback</code>
- If that string '''has''' been updated, check the <code>msg_resource</code> table in the database of the appropriate wiki for the apprpriate language <syntaxhighlight lang="sql">select * from msg_resource where mr_resource='<resource>' and mr_lang='<lang>'\G</syntaxhighlight>
- It may be necessary to truncate the <code>msg_resource</code> database table if the string in <code>msg_resource</code> is out of date, but the wiki '''does''' see the new string (checked in step 1) <syntaxhighlight lang="sql">truncate msg_resource;</syntaxhighlight>
<h2>..The Resource Loader (RL) and l10n..</h2> <p>In the case of a localization update ..</p> <ol><li> Check ..</li> <li> If that string .. language <div class="mw-highlight"><pre><span class="k">select</span> ..<span class="k">G</span></li></ol> </pre></div> <ol><li> It may ..step 1 <div class="mw-highlight"><pre><span class="k">truncate</span> <span class="n">msg_resource</span><span class="p">;</span></li></ol> </pre></div> <h2>..Security patches..</h2>
It seems the list item, and even the list itself, are closed before mw-highlight.
Change 221740 had a related patch set uploaded (by Bartosz Dziewoński):
Use 'nowiki' strip marker for <syntaxhighlight/> output
Change 221740 abandoned by Bartosz Dziewoński:
Use 'nowiki' strip marker for <syntaxhighlight/> output
Reason:
This is a very clever idea but probably not something we want to maintain. T104067 should be fixable using a variant of this solution described by Brad on the changeset. I'll implement it and submit as a new patch.
Change 221980 had a related patch set uploaded (by Bartosz Dziewoński):
Refactor final output formatting