@@ -4,9 +4,9 @@ var test = require('tape')
44var h = require ( 'hastscript' )
55var findAndReplace = require ( '.' )
66
7- test ( 'findAndReplace' , function ( t ) {
7+ test ( 'findAndReplace' , function ( t ) {
88 t . throws (
9- function ( ) {
9+ function ( ) {
1010 findAndReplace ( create ( ) , true )
1111 } ,
1212 / ^ E r r o r : E x p e c t e d a r r a y o r o b j e c t a s s c h e m a $ / ,
@@ -42,7 +42,7 @@ test('findAndReplace', function(t) {
4242 )
4343
4444 t . deepEqual (
45- findAndReplace ( create ( ) , / e m ( \w + ) i s / , function ( $0 , $1 ) {
45+ findAndReplace ( create ( ) , / e m ( \w + ) i s / , function ( $0 , $1 ) {
4646 return '[' + $1 + ']'
4747 } ) ,
4848 h ( 'p' , [
@@ -58,7 +58,7 @@ test('findAndReplace', function(t) {
5858 )
5959
6060 t . deepEqual (
61- findAndReplace ( create ( ) , 'emphasis' , function ( ) {
61+ findAndReplace ( create ( ) , 'emphasis' , function ( ) {
6262 return h ( 'a' , h ( 'b' , 'c' ) )
6363 } ) ,
6464 h ( 'p' , [
@@ -122,7 +122,7 @@ test('findAndReplace', function(t) {
122122
123123 t . deepEqual (
124124 findAndReplace ( create ( ) , {
125- emphasis : function ( ) {
125+ emphasis : function ( ) {
126126 return h ( 'a' , 'importance' )
127127 } ,
128128 importance : 'something else'
@@ -168,13 +168,13 @@ test('findAndReplace', function(t) {
168168
169169 t . deepEqual (
170170 findAndReplace ( h ( 'p' , 'Some emphasis, importance, and code.' ) , {
171- importance : function ( match ) {
171+ importance : function ( match ) {
172172 return h ( 'strong' , match )
173173 } ,
174- code : function ( match ) {
174+ code : function ( match ) {
175175 return h ( 'code' , match )
176176 } ,
177- emphasis : function ( match ) {
177+ emphasis : function ( match ) {
178178 return h ( 'em' , match )
179179 }
180180 } ) ,
@@ -186,19 +186,19 @@ test('findAndReplace', function(t) {
186186 findAndReplace ( h ( 'p' , 'Some emphasis, importance, and code.' ) , [
187187 [
188188 / i m p o r t a n c e / g,
189- function ( match ) {
189+ function ( match ) {
190190 return h ( 'strong' , match )
191191 }
192192 ] ,
193193 [
194194 / c o d e / g,
195- function ( match ) {
195+ function ( match ) {
196196 return h ( 'code' , match )
197197 }
198198 ] ,
199199 [
200200 / e m p h a s i s / g,
201- function ( match ) {
201+ function ( match ) {
202202 return h ( 'em' , match )
203203 }
204204 ]
@@ -224,7 +224,7 @@ test('findAndReplace', function(t) {
224224 )
225225
226226 t . deepEqual (
227- findAndReplace ( create ( ) , 'and' , function ( ) {
227+ findAndReplace ( create ( ) , 'and' , function ( ) {
228228 return h ( 'script' , 'alert(1)' )
229229 } ) ,
230230 h ( 'p' , [
0 commit comments