aboutsummaryrefslogtreecommitdiff
path: root/code_obj.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-17 14:12:11 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-17 14:12:51 -0700
commit0442c8dd216f16c7371873a8e8fd8bf83d30dad0 (patch)
treef3ca5f178b9851d27d95bf060f966e2398ef9a6a /code_obj.moon
parentbe06fc096aa28358914bd6a76b4ea380a04b8873 (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.moon')
-rw-r--r--code_obj.moon5
1 files changed, 1 insertions, 4 deletions
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