Since the hook_filter is only called on content creation/update the call to drupal_add_css() in texy_syntaxhighlighting_texy_handler() does not get executed on content view.
To solve it the css inclusion can be placed in a hook_init() function like the following:
function texy_syntaxhighlighting_init() {
if (variable_get('texy_syntaxhighlighting_use', FALSE)) {
// attach a stylesheet for the syntax highlighter
$css = variable_get('texy_syntaxhighlighting_css_path', FALSE);
if ( !empty($css) ) {
$path = drupal_get_path('module', 'texy_syntaxhighlighting');
drupal_add_css($path .'/lib/'. $css);
}
}
}
Comments
Comment #1
tomaszx commentedHi,
thanks for your code @DrSlump
it works perfectly. this must be inside module.
Comment #2
havran commentedFixed in 6.x-1.x-dev.