From 7c7a465966ea66d2b5ebbcf6567e7b04cbd3f9f2 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Sun, 28 Sep 2014 22:39:20 +0000 Subject: Implement syntax highlighting --- inc/functions.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/functions.php b/inc/functions.php index 2e16c419..65b49b37 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -76,6 +76,7 @@ function loadConfig() { 'file_icons', 'footer', 'stylesheets', + 'code_stylesheets', 'additional_javascript', 'markup', 'custom_pages', @@ -1515,9 +1516,17 @@ function buildJavascript() { 'uri' => addslashes((!empty($uri) ? $config['uri_stylesheets'] : '') . $uri)); } + $code_stylesheets = array(); + foreach ($config['code_stylesheets'] as $name => $uri) { + $code_stylesheets[] = array( + 'name' => addslashes($name), + 'uri' => addslashes((!empty($uri) ? $config['uri_stylesheets'] : '') . $uri)); + } + $script = Element('main.js', array( 'config' => $config, - 'stylesheets' => $stylesheets + 'stylesheets' => $stylesheets, + 'code_stylesheets' => $code_stylesheets )); // Check if we have translation for the javascripts; if yes, we add it to additional javascripts -- cgit v1.3