From 7600a98a2f19f6f429f012897687a6cce48b9607 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 19 Dec 2005 20:25:37 +0000 Subject: [PATCH] Allowing and explicating language-specific highlighting --- templates/default/code2.css | 13 +++++++++++++ view.php | 5 +---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/templates/default/code2.css b/templates/default/code2.css index 8cfced4..9b2364c 100644 --- a/templates/default/code2.css +++ b/templates/default/code2.css @@ -23,6 +23,19 @@ * Trac is under the GNU GPL version 2 */ +/* +* The definitions in this file apply to ALL types of highlighting. If you want to +* add more definitions (from other types of keywords by GeSHi) then you can name them +* ".code .CLASS_NAME" to have them apply to all languages. If you want to add or +* override a definition for a specific language, use ".GESHI_LANGUAGE .CLASS_NAME". +* +* This works because the code is wrapped like this: +*
+*
+*
+*
+*/ + /* Key Words I (if, do, while, etc.) */ .code .kw1 { diff --git a/view.php b/view.php index 8aaf1d5..2489e4d 100644 --- a/view.php +++ b/view.php @@ -66,7 +66,7 @@ $geshi = new Geshi($catdata, $language[MIMES_GESHI_LANGUAGE]); $geshi->enable_classes(); // header -$geshi->set_header_type(GESHI_HEADER_NONE); +$geshi->set_header_type(GESHI_HEADER_DIV); // disable links $urls = array_keys($geshi->language_data['URLS']); @@ -75,9 +75,6 @@ foreach ($urls AS $key) $geshi->set_url_for_keyword_group($key, ''); } -// css info -$geshi->set_overall_class('code'); - // don't do anything stupid $geshi->set_case_keywords(GESHI_CAPS_NO_CHANGE); -- 2.22.5