From: Christian Weiske Date: Tue, 21 Jun 2016 07:47:48 +0000 (+0200) Subject: Fix E_NOTICE in rST converter X-Git-Tag: v0.6.5~12 X-Git-Url: https://git.cweiske.de/grauphel.git/commitdiff_plain/3eaf73ae96bff4c0f967a7c2e2f8759dfa2bd006?hp=3706e6412a08c8f4b873ba38533b0479398136e7;ds=sidebyside Fix E_NOTICE in rST converter --- diff --git a/lib/converter/restructuredtext.php b/lib/converter/restructuredtext.php index 149fa4a..bc20551 100644 --- a/lib/converter/restructuredtext.php +++ b/lib/converter/restructuredtext.php @@ -106,7 +106,9 @@ class ReStructuredText extends Base $store .= static::$simpleMap[$reader->name]; } else if ($reader->name == 'list') { --$listLevel; - $listPrefix = str_repeat(' ', $listLevel); + $listPrefix = str_repeat( + ' ', $listLevel < 0 ? 0 : $listLevel + ); if ($listLevel == -1) { $store .= "\n"; }