From 30c02c4d6cdf82555ae9a8f0f43286e6a48b6a00 Mon Sep 17 00:00:00 2001 From: echicken <> Date: Thu, 27 Sep 2018 20:02:32 +0000 Subject: [PATCH] List depth stuff. --- exec/load/markdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec/load/markdown.js b/exec/load/markdown.js index e861f45a75..878e8ea5c8 100644 --- a/exec/load/markdown.js +++ b/exec/load/markdown.js @@ -271,10 +271,10 @@ Markdown.prototype.render_line_console = function (line) { } if (match[1].length > this.state.list_level) { this.state.list_level++; - if (lt == 'ol') this.state.list_stack.push(0); + if (lt == 'ol') this.state.list_stack[this.state.list_level] = 0; } else if (match[1].length < this.state.list_level) { + if (lt == 'ol') this.state.list_stack.splice(this.state.list_level, 1); this.state.list_level--; - if (lt == 'ol') this.state.list_stack.pop(); } else if (lt == 'ol') { if (typeof this.state.list_stack[this.state.list_level] != 'number') { this.state.list_stack[this.state.list_level] = 0; -- GitLab