File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const extendedWordChars = 'a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2
25
25
// Each token is one of the following:
26
26
// - A punctuation mark plus the surrounding whitespace
27
27
// - A word plus the surrounding whitespace
28
- // - Pure whitespace (but only in the special case where this the entire text
28
+ // - Pure whitespace (but only in the special case where the entire text
29
29
// is just whitespace)
30
30
//
31
31
// We have to include surrounding whitespace in the tokens because the two
@@ -318,7 +318,7 @@ function dedupeWhitespaceInChangeObjects(
318
318
class WordsWithSpaceDiff extends Diff < string , string > {
319
319
tokenize ( value : string ) {
320
320
// Slightly different to the tokenizeIncludingWhitespace regex used above in
321
- // that this one treats each individual newline as a distinct tokens , rather
321
+ // that this one treats each individual newline as a distinct token , rather
322
322
// than merging them into other surrounding whitespace. This was requested
323
323
// in https://github.com/kpdecker/jsdiff/issues/180 &
324
324
// https://github.com/kpdecker/jsdiff/issues/211
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export function hasOnlyUnixLineEndings(string: string): boolean {
104
104
105
105
export function trailingWs ( string : string ) : string {
106
106
// Yes, this looks overcomplicated and dumb - why not replace the whole function with
107
- // return string match(/\s*$/)[0]
107
+ // return string. match(/\s*$/)[0]
108
108
// you ask? Because:
109
109
// 1. the trap described at https://markamery.com/blog/quadratic-time-regexes/ would mean doing
110
110
// this would cause this function to take O(n²) time in the worst case (specifically when
You can’t perform that action at this time.
0 commit comments