From b442aa2dd6764fdb3c5caae6597e0846a06864b0 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 25 Aug 2014 09:29:35 -0600 Subject: [PATCH] Added page option for markdown_extra --- system/src/Grav/Common/Page/Page.php | 10 +++++++++- user/config/system.yaml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 55bcd1da2..63ebc1152 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -70,6 +70,7 @@ class Page protected $modular_twig; protected $process; protected $summary_size; + protected $markdown_extra; /** * @var Page Unmodified (original) version of the page. Used for copying and moving the page. @@ -201,6 +202,9 @@ class Page if (isset($this->header->date)) { $this->date = strtotime($this->header->date); } + if (isset($this->header->markdown_extra)) { + $this->markdown_extra = (bool)$this->header->markdown_extra; + } if (isset($this->header->taxonomy)) { foreach ($this->header->taxonomy as $taxonomy => $taxitems) { $this->taxonomy[$taxonomy] = (array)$taxitems; @@ -214,7 +218,9 @@ class Page $this->process[$process] = $status; } } + } + return $this->header; } @@ -1517,7 +1523,9 @@ class Page { /** @var Config $config */ $config = self::$grav['config']; - if ($config->get('system.pages.markdown_extra')) { + + // get the appropriate setting for markdown extra + if (isset($this->markdown_extra) ? $this->markdown_extra : $config->get('system.pages.markdown_extra')) { $parsedown = new MarkdownExtra($this); } else { $parsedown = new Markdown($this); diff --git a/user/config/system.yaml b/user/config/system.yaml index 84a96f979..be6a776ed 100644 --- a/user/config/system.yaml +++ b/user/config/system.yaml @@ -3,7 +3,7 @@ home: pages: theme: antimatter - markdown_extra: true + markdown_extra: false process: markdown: true twig: false