File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ describe('PostHTML-Parser test', function() {
66
66
expect ( parser ( '<!doctype html>' ) ) . to . eql ( [ '<!doctype html>' ] ) ;
67
67
} ) ;
68
68
69
+ it ( 'should be parse directive' , function ( ) {
70
+ var customDirectives = { directives : [
71
+ { name : '?php' , start : '<' , end : '>' }
72
+ ] } ;
73
+
74
+ expect ( parser ( '<?php echo "Hello word"; ?>' , customDirectives ) ) . to . eql ( [ '<?php echo "Hello word"; ?>' ] ) ;
75
+ } ) ;
76
+
69
77
it ( 'should be parse tag' , function ( ) {
70
78
expect ( parser ( '<html></html>' ) ) . to . eql ( [ { tag : 'html' } ] ) ;
71
79
} ) ;
@@ -105,10 +113,4 @@ describe('PostHTML-Parser test', function() {
105
113
{ tag : 'mySuperTag' }
106
114
] ) ;
107
115
} ) ;
108
-
109
- it ( 'should be parse directive' , function ( ) {
110
- expect ( parser ( '<?php echo "Hello word"; ?>' ) ) . to . eql ( [
111
- { type : 'directive' , content : [ '?php echo "Hello word"; ?' ]
112
- } ] ) ;
113
- } ) ;
114
116
} ) ;
You can’t perform that action at this time.
0 commit comments