diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-17 14:12:11 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-17 14:12:51 -0700 |
| commit | 0442c8dd216f16c7371873a8e8fd8bf83d30dad0 (patch) | |
| tree | f3ca5f178b9851d27d95bf060f966e2398ef9a6a /code_obj.lua | |
| parent | be06fc096aa28358914bd6a76b4ea380a04b8873 (diff) | |
Overhaul of comment handling, plus a few fixes (e.g. a fix for indented
text that begins with a nomsu comment)
Diffstat (limited to 'code_obj.lua')
| -rw-r--r-- | code_obj.lua | 6 |
1 files changed, 1 insertions, 5 deletions
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 |
