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
2525// Each token is one of the following:
2626// - A punctuation mark plus the surrounding whitespace
2727// - 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
2929// is just whitespace)
3030//
3131// We have to include surrounding whitespace in the tokens because the two
@@ -318,7 +318,7 @@ function dedupeWhitespaceInChangeObjects(
318318class WordsWithSpaceDiff extends Diff < string , string > {
319319 tokenize ( value : string ) {
320320 // 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
322322 // than merging them into other surrounding whitespace. This was requested
323323 // in https://github.com/kpdecker/jsdiff/issues/180 &
324324 // 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 {
104104
105105export function trailingWs ( string : string ) : string {
106106 // 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]
108108 // you ask? Because:
109109 // 1. the trap described at https://markamery.com/blog/quadratic-time-regexes/ would mean doing
110110 // 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