1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-11 00:24:16 +02:00

Version 1.1.3. Admin Dashboard

This commit is contained in:
Sebastian
2018-04-18 19:49:12 +02:00
parent c5c84c96bc
commit f8dc7093bf
65 changed files with 3285 additions and 1044 deletions

View File

@@ -15,7 +15,7 @@ class ParsedownExtension extends \ParsedownExtra
{
# make sure no definitions are set
$this->DefinitionData = array();
# standardize line breaks
$text = str_replace(array("\r\n", "\r"), "\n", $text);
@@ -38,27 +38,25 @@ class ParsedownExtension extends \ParsedownExtra
# trim line breaks
$markup = trim($markup, "\n");
if (isset($this->DefinitionData['TableOfContents']))
if(isset($this->DefinitionData['TableOfContents']))
{
$TOC = $this->buildTOC($this->headlines);
$markup = preg_replace('%(<p[^>]*>\[TOC\]</p>)%i', $TOC, $markup);
}
# merge consecutive dl elements
$markup = preg_replace('/<\/dl>\s+<dl>\s+/', '', $markup);
# add footnotes
if (isset($this->DefinitionData['Footnote']))
{
$Element = $this->buildFootnoteElement();
$markup .= "\n" . $this->element($Element);
}
return $markup;
}