summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/libraries/Pygments.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/application/libraries/Pygments.php b/application/libraries/Pygments.php
index be59beb90..24975d6a1 100644
--- a/application/libraries/Pygments.php
+++ b/application/libraries/Pygments.php
@@ -48,21 +48,21 @@ class Pygments {
});
}
+ // Allow certain types to be highlight without doing it automatically
public function should_highlight()
{
+ $typearray = array(
+ 'image/svg+xml',
+ );
+ if (in_array($this->mimetype, $typearray)) return false;
+
if ($this->mime2lexer($this->mimetype)) return true;
return false;
}
- // Allow certain types to be highlight without doing it automatically
public function can_highlight()
{
- $typearray = array(
- 'image/svg+xml',
- );
- if (in_array($this->mimetype, $typearray)) return true;
-
if ($this->mime2lexer($this->mimetype)) return true;
return false;
@@ -71,7 +71,7 @@ class Pygments {
// Return the lexer that should be used for highlighting
public function autodetect_lexer()
{
- if (!$this->can_highlight($this->mimetype)) {
+ if (!$this->should_highlight()) {
return false;
}