Page MenuHomePhabricator

CSS not included in page with SyntaxHighlight GeSHi
Closed, DeclinedPublic

Description

Author: kenny

Description:
First try at including the CSS in the Wiki page.

The line in SyntaxHighlight_GeSHi.php:
$wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';

no longer works (at least in MediaWiki 1.10) to include the CSS in the resulting Wiki page. The result is that the span tags are inserted correctly into the page, but no CSS style information is included.


Version: unspecified
Severity: minor

Attached:

Details

Reference
bz10773

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:50 PM
bzimport added a project: SyntaxHighlight.
bzimport set Reference to bz10773.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

  1. The ShowRawCssJs hook has never existed in the 1.10 branch
  2. This hook is nothing to do with the parser hook which deals with the <source> tag
  3. CSS isn't embedded into the page at the parser output location, but rather, passed to the ParserOutput as a "head item" (concept introduced in 1.10) which is then passed to the OutputPage when the page is viewed

I can confirm that <source> works as expected in both 1.10.x and 1.11alpha, and that in the latter, highlighting on eligible CSS and JavaScript pages works too.