From 79c27b41988feea77b83146d7eeada502bad661b Mon Sep 17 00:00:00 2001 From: Terry Fleury Date: Fri, 8 Jun 2018 16:50:20 -0500 Subject: [PATCH 1/2] PHP 5.3 is supported only on Precise. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9fe0280..1d392c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.3 - 5.4 - 5.5 - 5.6 From 46416e220fecdb5f7ae4bcda12b86aff4a262546 Mon Sep 17 00:00:00 2001 From: Terry Fleury Date: Fri, 8 Jun 2018 16:51:02 -0500 Subject: [PATCH 2/2] For markdown which mistakenly uses 'code' rather than 'code-block', an error occurs. So simply allow 'code' as valid markdown which identical functionality to 'code-block'. --- Directives/Code.php | 50 +++++++++++++++++++++++++++++++++++++++++++++ Kernel.php | 1 + 2 files changed, 51 insertions(+) create mode 100644 Directives/Code.php diff --git a/Directives/Code.php b/Directives/Code.php new file mode 100644 index 0000000..c8164dd --- /dev/null +++ b/Directives/Code.php @@ -0,0 +1,50 @@ +getKernel(); + + if ($node instanceof CodeNode) { + $node->setLanguage(trim($data)); + } + + if ($variable) { + $environment = $parser->getEnvironment(); + $environment->setVariable($variable, $node); + } else { + $document = $parser->getDocument(); + $document->addNode($node); + } + } + } + + public function wantCode() + { + return true; + } +} diff --git a/Kernel.php b/Kernel.php index 57815df..3b03ad9 100644 --- a/Kernel.php +++ b/Kernel.php @@ -41,6 +41,7 @@ public function getDirectives() { return array( new Directives\Dummy, + new Directives\Code, new Directives\CodeBlock, new Directives\Raw, new Directives\Replace,