Page MenuHomePhabricator

Preview of JS/CSS pages should highlight the source code instead of using simple <pre> tags
Closed, ResolvedPublic

Description

Since bug 4801 was fixed, it is now possible to preview the source code of scripts and stylesheets when editing CSS and JS pages. Nonetheless, the source code is displayed in a <pre> instead of being highlighted (as happens e.g. after the page is saved).

It would be useful to have Geshi highlighting applied to the code during preview, because then the users wouldn't need to put <source> tags around the code (as in the URL above).


Version: unspecified
Severity: enhancement

Details

Reference
bz27397

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:16 PM
bzimport set Reference to bz27397.

Bryan.TongMinh wrote:

Changing component to Geshi.

I'm not sure this really has anything to do with Geshi, does it? This would require previews to use Geshi, is all.

(In reply to comment #2)

I'm not sure this really has anything to do with Geshi, does it? This would
require previews to use Geshi, is all.

Geshi is an extension, so previews using Geshi would have to be implemented in Geshi, not in core.

(In reply to comment #3)

(In reply to comment #2)

I'm not sure this really has anything to do with Geshi, does it? This would
require previews to use Geshi, is all.

Geshi is an extension, so previews using Geshi would have to be implemented in
Geshi, not in core.

...or in SyntaxHighlight, rather. Geshi is the highlighting library.

I recall reading a comment in another bug that this would require a new hook for extensions (I don't remember what bug it was, though, and I couldn't find the comment when I looked earlier)... Am I misremembering, or is that correct?

shealen.clare wrote:

This bug has not been touched in at least six months. With this in mind, I've been asked by the bugmeister to bump this bug's priority down for "High". Concerns can be addressed to mah@everybody.org.

I just tested and this seems to have been fixed by the set of patches for bug 64859.