aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/converter/restructuredtext.php4
1 files changed, 3 insertions, 1 deletions
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";
}