aboutsummaryrefslogtreecommitdiff
path: root/string2.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-09-13 16:01:57 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-09-13 16:02:40 -0700
commit4d48bf359df98512a2a741d48ea222d055b733c0 (patch)
treef05f33baf4dd776f3f68230a611beafedbb2da4b /string2.moon
parentea310306d73e0bc6542f7133825549ae4471b06a (diff)
Improvements to indented text parsing and error reporting.
Diffstat (limited to 'string2.moon')
-rw-r--r--string2.moon2
1 files changed, 1 insertions, 1 deletions
diff --git a/string2.moon b/string2.moon
index 735a2cb..2273cff 100644
--- a/string2.moon
+++ b/string2.moon
@@ -26,7 +26,7 @@ string2 = {
assert(type(pos) == 'number', "Invalid string position")
return if pos < 1 or pos > #@
for i, line, start, stop in isplit(@, '\n')
- if stop >= pos
+ if stop+1 >= pos
return line, i, (pos-start+1)
wrap: (maxlen=80, buffer=8)=>