summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/file.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 1888b7c06..c26ae0420 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -229,9 +229,13 @@ class File extends MY_Controller {
}
}
- $this->output_cache->add_function(function() use ($filedata, $lexer, $is_multipaste) {
- $this->_highlight_file($filedata, $lexer, $is_multipaste);
- });
+ if ($lexer == "asciinema") {
+ $this->output_cache->add(array("filedata" => $filedata), "file/fragments/asciinema-player");
+ } else {
+ $this->output_cache->add_function(function() use ($filedata, $lexer, $is_multipaste) {
+ $this->_highlight_file($filedata, $lexer, $is_multipaste);
+ });
+ }
}
// TODO: move lexers json to dedicated URL