From 0442c8dd216f16c7371873a8e8fd8bf83d30dad0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 17 Jul 2018 14:12:11 -0700 Subject: Overhaul of comment handling, plus a few fixes (e.g. a fix for indented text that begins with a nomsu comment) --- code_obj.moon | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'code_obj.moon') diff --git a/code_obj.moon b/code_obj.moon index caca4cf..0981d5a 100644 --- a/code_obj.moon +++ b/code_obj.moon @@ -73,10 +73,7 @@ class Code @current_indent = #spaces @trailing_line_len = #trailing_text else - if #b.indents > 1 - @trailing_line_len = b.trailing_line_len - else - @trailing_line_len += #tostring(b) + @trailing_line_len = math.min(@trailing_line_len + #tostring(b), b.trailing_line_len) if @current_indent != 0 indents[#bits] = @current_indent @__str = nil -- cgit v1.2.3