v-code-diff 1.7.0 → 1.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-code-diff",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "template component for vue-demi, can dev and build",
5
5
  "exports": {
6
6
  ".": {
package/src/utils.ts CHANGED
@@ -47,7 +47,7 @@ function diffLines(prev: string, current: string) {
47
47
  dmp.diff_charsToLines_(diffs, lineArray)
48
48
  return diffs.map((x) => {
49
49
  const [type, text] = x
50
- const count = text.trim().split('\n').length
50
+ const count = text.replace(/\n$/, '').split('\n').length
51
51
  const change: Diff.Change = {
52
52
  count,
53
53
  value: text,