From 1a9c4132c2501b9d1f18fe0f06170697266b7ef2 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Mon, 24 Mar 2014 22:10:12 -0500 Subject: [PATCH] Updating css for word wrapping syntaxhighlighting Updating issues with syntaxhighlighting and html tags --- indefero/src/IDF/FileUtil.php | 6 ++++-- indefero/www/media/idf/css/syntaxhighlight/shCore.css | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/indefero/src/IDF/FileUtil.php b/indefero/src/IDF/FileUtil.php index 355efe3..db9563c 100644 --- a/indefero/src/IDF/FileUtil.php +++ b/indefero/src/IDF/FileUtil.php @@ -84,8 +84,10 @@ class IDF_FileUtil $ext = self::$map[$fileinfo[2]]; else $ext = "text"; - - $content = '
'; + if ($ext == "php" || $ext == "html" || $ext == "htm" || $ext == "js") + $content = '
' . str_replace("<", "<", $content)  . '
'; + else + $content = '
'; return Pluf_Template::markSafe($content); } diff --git a/indefero/www/media/idf/css/syntaxhighlight/shCore.css b/indefero/www/media/idf/css/syntaxhighlight/shCore.css index 2bbf94b..e23e682 100644 --- a/indefero/www/media/idf/css/syntaxhighlight/shCore.css +++ b/indefero/www/media/idf/css/syntaxhighlight/shCore.css @@ -261,4 +261,8 @@ /* Strings */ .syntaxhighlighter .asmstring -{ color: #b0002d; font-weight: normal !important; } \ No newline at end of file +{ color: #b0002d; font-weight: normal !important; } + +body .syntaxhighlighter .line { + white-space: pre-wrap !important; /* make code wrap */ +} \ No newline at end of file