From 3eaf73ae96bff4c0f967a7c2e2f8759dfa2bd006 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 21 Jun 2016 09:47:48 +0200 Subject: [PATCH] Fix E_NOTICE in rST converter --- lib/converter/restructuredtext.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"; } -- 2.30.2