Skip to content

Commit 68bd133

Browse files
committed
lint
1 parent 2569785 commit 68bd133

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

diff/patience.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export const diff = (as, bs) => {
2727
return lcs(middleAs, middleBs, commonPrefix)
2828
}
2929

30-
3130
/**
3231
* @param {string} a
3332
* @param {string} b
@@ -65,7 +64,7 @@ export const diffSplitBy = (a, b, _regexp) => {
6564
*/
6665
export const diffAuto = (a, b) =>
6766
diffSplitBy(a, b, '\n').map(d =>
68-
diffSplitBy(d.remove, d.insert, /\.\ |[a-zA-Z0-9]+|[\.\ \(\)\[\]\,\;\{\}]/g).map(dd => ({
67+
diffSplitBy(d.remove, d.insert, /\. |[a-zA-Z0-9]+|[. ()[\],;{}]/g).map(dd => ({
6968
insert: dd.insert,
7069
remove: dd.remove,
7170
index: dd.index + d.index
@@ -80,7 +79,7 @@ const removeCommonPrefixAndSuffix = (as, bs) => {
8079
const commonLen = math.min(as.length, bs.length)
8180
let commonPrefix = 0
8281
let commonSuffix = 0
83-
// match start
82+
// match start
8483
for (; commonPrefix < commonLen && as[commonPrefix] === bs[commonPrefix]; commonPrefix++) { /* nop */ }
8584
// match end
8685
for (; commonSuffix < commonLen - commonPrefix && as[as.length - 1 - commonSuffix] === bs[bs.length - 1 - commonSuffix]; commonSuffix++) { /* nop */ }

diff/patience.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,3 @@ export const testRepeatRandomWordReplace = tc => {
154154
t.assert(d.length <= NReplacements + 1 + NInserts + NDeletes) // Sanity check: A maximum of one fault
155155
})
156156
}
157-

0 commit comments

Comments
 (0)