commit c19b21d1489431f63d1264f91071696c14555450
parent 8bdf57a7685246095d03e8edea018acad829fd95
Author: markseu <mark2011@mayberg.se>
Date: Tue, 27 Jan 2015 16:55:30 +0100
Core update (table of contents support)
Diffstat:
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/system/plugins/markdownextra.php b/system/plugins/markdownextra.php
@@ -1,11 +1,11 @@
<?php
-// Copyright (c) 2013-2014 Datenstrom, http://datenstrom.se
+// Copyright (c) 2013-2015 Datenstrom, http://datenstrom.se
// This file may be used and distributed under the terms of the public license.
// Markdown extra plugin
class YellowMarkdownExtra
{
- const Version = "0.4.3";
+ const Version = "0.4.4";
var $yellow; //access to API
// Handle plugin initialisation
@@ -117,7 +117,7 @@ class YellowMarkdownExtraParser extends MarkdownExtraParser
$text = $matches[1];
$level = $matches[3]{0} == '=' ? 1 : 2;
$attr = $this->doExtraAttributes("h$level", $dummy =& $matches[2]);
- if(empty($attr) && $level==2) $attr = $this->getIdAttribute($text);
+ if(empty($attr) && $level>=2 && $level<=3) $attr = $this->getIdAttribute($text);
$output = "<h$level$attr>".$this->runSpanGamut($text)."</h$level>";
return "\n".$this->hashBlock($output)."\n\n";
}
@@ -128,7 +128,7 @@ class YellowMarkdownExtraParser extends MarkdownExtraParser
$text = $matches[2];
$level = strlen($matches[1]);
$attr = $this->doExtraAttributes("h$level", $dummy =& $matches[3]);
- if(empty($attr) && $level==2) $attr = $this->getIdAttribute($text);
+ if(empty($attr) && $level>=2 && $level<=3) $attr = $this->getIdAttribute($text);
$output = "<h$level$attr>".$this->runSpanGamut($text)."</h$level>";
return "\n".$this->hashBlock($output)."\n\n";
}
diff --git a/system/themes/default.css b/system/themes/default.css
@@ -1,4 +1,4 @@
-/* Yellow default theme 0.4.4 */
+/* Yellow default theme 0.4.5 */
html, body, div, form, pre, span, tr, th, td { margin:0; padding:0; border:0; vertical-align:baseline; }
body {
@@ -33,6 +33,7 @@ a, img { border:none; text-decoration:none; }
.content td { text-align:left; padding:0.3em; border-top:1px solid #ddd;}
.content .flexible { position:relative; padding-bottom:56.25%; padding-top:30px; }
.content .flexible iframe { position:absolute; top:0; left:0; width:100%; height:100%; }
+.content .toc { margin:0; padding:0; list-style:none; }
.footer { margin-top:2em; }
.footer a { color:#717171; }
.footer a:hover { color:#07d; text-decoration:underline; }