remark-break-line 0.0.13 → 0.0.14

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.
Files changed (2) hide show
  1. package/lib/index.js +3 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -206,13 +206,15 @@ export default function remarkBreakLongLines({ maxLineLength = 80, removeLinebre
206
206
  // We need to increase i because we increase the text
207
207
  i++
208
208
  n.value = '\n' + n.value
209
+ currentLine = i - lastIndex
209
210
  } else if (currentLine + additionalCharacters == maxLineLength - baseIndention) {
210
211
  n.value = replaceAt(n.value, i, '\n')
212
+ currentLine = 0;
211
213
 
212
214
  } else {
213
215
  n.value = replaceAt(n.value, lastIndex, '\n')
216
+ currentLine = i - lastIndex
214
217
  }
215
- currentLine = i - lastIndex
216
218
  }
217
219
  }
218
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remark-break-line",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "keywords": [