@nitra/cursor 1.35.3 → 1.35.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -187,8 +187,8 @@ function findOffendersInBody(body) {
|
|
|
187
187
|
*/
|
|
188
188
|
function computeLineOffsets(body) {
|
|
189
189
|
const offsets = [0]
|
|
190
|
-
for (
|
|
191
|
-
if (
|
|
190
|
+
for (let i = 0; i < body.length; i++) {
|
|
191
|
+
if (body[i] === '\n') offsets.push(i + 1)
|
|
192
192
|
}
|
|
193
193
|
return offsets
|
|
194
194
|
}
|