@@ -80,23 +80,23 @@ export class AbbrMarker implements AbstractMarker {
8080 // Allow: Multi-period abbr
8181 // Example: U.S.A
8282 if ( / ^ ( [ a - z A - Z ] \. ) { 3 , } $ / . test ( currentWord ) ) {
83- return sourceCode . markContextRange ( [ sourceCode . index , sourceCode . index + currentWord . length ] ) ;
83+ return sourceCode . markContextRange ( [ sourceCode . offset , sourceCode . offset + currentWord . length ] ) ;
8484 }
8585 // EXCALAMATION_WORDS
8686 // Example: Yahoo!
8787 const isMatchedEXCALAMATION_WORDS = this . lang . EXCALAMATION_WORDS . some ( abbr => {
8888 return compareNoCaseSensitive ( abbr , currentWord ) ;
8989 } ) ;
9090 if ( isMatchedEXCALAMATION_WORDS ) {
91- return sourceCode . markContextRange ( [ sourceCode . index , sourceCode . index + currentWord . length ] ) ;
91+ return sourceCode . markContextRange ( [ sourceCode . offset , sourceCode . offset + currentWord . length ] ) ;
9292 }
9393 // PREPOSITIVE_ABBREVIATIONS
9494 // Example: Mr. Fuji
9595 const isMatchedPREPOSITIVE_ABBREVIATIONS = this . lang . PREPOSITIVE_ABBREVIATIONS . some ( abbr => {
9696 return compareNoCaseSensitive ( abbr , currentWord ) ;
9797 } ) ;
9898 if ( isMatchedPREPOSITIVE_ABBREVIATIONS ) {
99- return sourceCode . markContextRange ( [ sourceCode . index , sourceCode . index + currentWord . length ] ) ;
99+ return sourceCode . markContextRange ( [ sourceCode . offset , sourceCode . offset + currentWord . length ] ) ;
100100 }
101101 // ABBREVIATIONS
102102 const isMatched = this . lang . ABBREVIATIONS . some ( abbr => {
@@ -111,11 +111,11 @@ export class AbbrMarker implements AbstractMarker {
111111 // Example: `I` as a sentence boundary and `I` as an abbreviation
112112 // > We make a good team, you and I. Did you see Albert I. Jones yesterday?
113113 if ( isCapitalized ( prevWord ) && / [ A - Z ] \. / . test ( currentWord ) && isCapitalized ( nextWord ) ) {
114- sourceCode . markContextRange ( [ sourceCode . index , sourceCode . index + currentWord . length ] ) ;
114+ sourceCode . markContextRange ( [ sourceCode . offset , sourceCode . offset + currentWord . length ] ) ;
115115 } else if ( isMatched && ! isCapitalized ( nextWord ) ) {
116116 // Exception. This allow to write Capitalized word at next word
117117 // A.M. is store.
118- sourceCode . markContextRange ( [ sourceCode . index , sourceCode . index + currentWord . length ] ) ;
118+ sourceCode . markContextRange ( [ sourceCode . offset , sourceCode . offset + currentWord . length ] ) ;
119119 }
120120 }
121121}
0 commit comments