From cbcb787e697f084c44c824e33b231e90230cdab3 Mon Sep 17 00:00:00 2001 From: echicken <> Date: Thu, 27 Sep 2018 22:21:59 +0000 Subject: [PATCH] Numbered list fixes. --- 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 878e8ea5c8..cb90b9afb6 100644 --- a/exec/load/markdown.js +++ b/exec/load/markdown.js @@ -270,11 +270,11 @@ Markdown.prototype.render_line_console = function (line) { lt = 'ol'; } if (match[1].length > this.state.list_level) { - this.state.list_level++; + this.state.list_level = match[1].length; 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--; + this.state.list_level = match[1].length; } 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