Last modified: 2014-11-17 10:35:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10871 - Apply syntax highlighting to eligible pages during diffs and page previews
Apply syntax highlighting to eligible pages during diffs and page previews
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SyntaxHighlight (GeSHi) (Other open bugs)
unspecified
All All
: Normal minor with 2 votes (vote)
: ---
Assigned To: X!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-10 07:02 UTC by jeremyb
Modified: 2014-11-17 10:35 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description jeremyb 2007-08-10 07:02:15 UTC
When viewing a diff from the page history of a page that gets highlighting, the rendered version shown (below the diff) is displayed without highlighting and in a variable width font.
Also, prolly separate bug, but when previewing the same page there is no preview shown at all.
Comment 1 Carl Fürstenberg 2007-10-10 21:57:58 UTC
There is a current problem, in that when diffing js pages, the page sometimes can be difficult to read, as JS sometimes includes absolutely positioned divs etc...
Comment 2 Platonides 2007-10-10 22:22:48 UTC
It refers to auto-highlighted pages (js/css)
Comment 3 Carl Fürstenberg 2007-10-10 23:40:36 UTC
as it can introduce problem viewing some sort of page actions, then I don't think it should be described as "enchantment"
Comment 4 Rob Church 2007-10-10 23:43:17 UTC
There's effectively two issues, here then; MediaWiki's lousy handling of such pages during diffs and previews, and its failure to call the appropriate hook for the extension.

One's a bug, one's theoretically an enhancement.
Comment 5 Carl Fürstenberg 2007-10-11 00:03:57 UTC
Yes, it can both be seen as an enhancement and a bug. To visualize a potential buggy part of this, I've created an example javascript page, perhaps some would do a script similar to that, to display some sort of splash screen. The code is at http://en.wikipedia.org/wiki/User:AzaToth/differror.js and the problem is viewed at http://en.wikipedia.org/w/index.php?title=User:AzaToth/differror.js&diff=163690181 for example.
Comment 6 Krinkle 2010-07-18 20:27:57 UTC
Not exactly sure but as of MediaWiki  v1.16.0beta3 I still see pages like MediaWiki:Vector.js not using <pre> tags at all during preview.

Diff-view has been fixed though.

Note: My test-install did not include the SyntaxHighlighing extension at this point. But js/css pages are rendered in <pre> by core functionality aswell. And that seems to be broken when previewing.

Ofcourse when editing user-scripts and (via the Gadgets extension) these are (sometimes?) executed when previewing the page so those probably dont need any change during preview.

So I guess it's MediaWiki not recognizing it's supposed to render it as sourcecode when previewing. And thus neither the core function to wrap in <pre>, nor third party extensions can hook that.

So, change the component to MW core ?
Comment 7 Erwin Dokter 2010-12-07 12:12:05 UTC
1.16wmf4: Yes, diffs seem fixed and preview of .css and .js files in User: space seems disabled (for good reason), but preview of .css and .js files in MediaWiki: space remains being rendered as wikitext; they also need highlighting, or at least be wrapped in <pre>.
Comment 8 Platonides 2010-12-07 14:55:57 UTC
Fixed in r77981. Only <pre> formatting is used, since the hook used by SyntaxHighlighting is not appropiate there.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links