-
2005-02-25
gellenburg
I've created a new GeSHi language module (for REALbasic) and have set specific colors for syntax highlighting, but the style.css overrides the colors specifically set in the GeSHi language.php file.
Is there any way to force Doku Wiki to acknowledge the colors set in GeSHi?
-
2005-02-25
andi
To reduce the data amount that needs to be transfered DokuWiki uses one stylesheet for all GeShi languages. There is currently no simple way to change this. But you can remove the $geshi->enable_classes(); from inc/parser.php if you really think this is needed.
-
2005-02-25
andi
I changed this task to a feature request to add a config option for it.
-
2005-02-25
gellenburg
I'm not sure I understand.
What does removing $geshi->enable_classes(); do?
Would it be easier perhaps to have Doku Wiki parse the geshi language files and create static stylesheets based on them (perhaps not automatically even but maybe an "update_stylesheets.php" file which does this?
Then Doku Wiki could, based on the "<code ....>" tags, include the style sheets (or inherit them) based on the languages used?
-
2005-02-25
andi
If you disable classes GeShi uses inline style tags to format the language instead of assigning classes.
Including stylesheets based on used languages isn't possible because the time the stylesheets are included the content isn't parsed yet. I think the current solution is a good compromise and works quite fine for all languages I ever used.
-
2005-07-12
ChrisS
It should be possible to add a second class matching the language to the <pre class='code'> currently generated. That would allow style sheet additions for individual languages.
The change is very straightforward,
inc/parser/xhtml.php #352
- $geshi->set_overall_class('code');
+ $geshi->set_overall_class("code $language");
style selectors of the form .code.language .geshicode {color:#xxxxxx} will override the styles in lib/styles/style.css
e.g.
.code.php .kw2 {color: #ff0000;} /* will change <?php from black to red */
-
2005-07-12
andi
added suggested change