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.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'code_obj.lua') diff --git a/code_obj.lua b/code_obj.lua index edbd446..a861bf2 100644 --- a/code_obj.lua +++ b/code_obj.lua @@ -105,11 +105,7 @@ do self.trailing_line_len = #trailing_text end else - if #b.indents > 1 then - self.trailing_line_len = b.trailing_line_len - else - self.trailing_line_len = self.trailing_line_len + #tostring(b) - end + self.trailing_line_len = math.min(self.trailing_line_len + #tostring(b), b.trailing_line_len) if self.current_indent ~= 0 then indents[#bits] = self.current_indent end -- cgit v1.2.3