File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ export default class Banner {
17
17
}
18
18
19
19
isModified ( ) {
20
- return this . editor . getTextInBufferRange ( this . marker . getBufferRange ( ) ) !== this . originalText ;
20
+ const chomp = line => line . replace ( / \r ? \n $ / , '' ) ;
21
+
22
+ const text = this . editor . getTextInBufferRange ( this . marker . getBufferRange ( ) ) ;
23
+ return chomp ( text ) !== chomp ( this . originalText ) ;
21
24
}
22
25
23
26
revert ( ) {
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ export default class Separator {
16
16
17
17
isModified ( ) {
18
18
const currentText = this . editor . getTextInBufferRange ( this . getMarker ( ) . getBufferRange ( ) ) ;
19
- return ! / ^ = = = = = = = \r ? \n / . test ( currentText ) ;
19
+ return ! / ^ = = = = = = = \r ? \n ? $ / . test ( currentText ) ;
20
20
}
21
21
}
You can’t perform that action at this time.
0 commit comments