@@ -12,9 +12,9 @@ var hidden = require('is-hidden');
12
12
var toString = require ( 'nlcst-to-string' ) ;
13
13
var modifier = require ( '..' ) ;
14
14
15
- var position = retext ( english ) . use ( plugin ) ;
16
- var noPosition = retext ( english ) . use ( plugin ) . use ( function ( instance ) {
17
- instance . Parser . prototype . position = false ;
15
+ var position = retext ( ) . use ( english ) . use ( plugin ) ;
16
+ var noPosition = retext ( ) . use ( english ) . use ( plugin ) . use ( function ( ) {
17
+ this . Parser . prototype . position = false ;
18
18
} ) ;
19
19
20
20
test ( 'nlcst-emoticon-modifier()' , function ( t ) {
@@ -47,7 +47,7 @@ test('emoticons', function (t) {
47
47
emoticons . forEach ( function ( emoticon ) {
48
48
emoticon . emoticons . forEach ( function ( value ) {
49
49
var fixture = 'Who doesn’t like ' + value + '?' ;
50
- var node = position . run ( position . parse ( fixture ) ) ;
50
+ var node = position . runSync ( position . parse ( fixture ) ) ;
51
51
var emoticon = node . children [ 0 ] . children [ 0 ] . children [ 6 ] ;
52
52
53
53
t . doesNotThrow (
@@ -64,8 +64,8 @@ test('emoticons', function (t) {
64
64
} ) ;
65
65
66
66
/* Add modifier to processor. */
67
- function plugin ( processor ) {
68
- processor . Parser . prototype . use ( 'tokenizeSentence' , modifier ) ;
67
+ function plugin ( ) {
68
+ this . Parser . prototype . use ( 'tokenizeSentence' , modifier ) ;
69
69
}
70
70
71
71
/* Clone `object` but omit positional information. */
0 commit comments