File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -204,4 +204,18 @@ describe('PostHTML-Parser test', function() {
204
204
{ tag : 'mySuperTag' }
205
205
] ) ;
206
206
} ) ;
207
+
208
+ it ( 'should be parse simple contents are split with "<" in comment' , function ( ) {
209
+ const html = `<a> /* width < 800px */ <hr /> test</a>`
210
+ expect ( parser ( html ) ) . to . eql ( [
211
+ { tag : 'a' , content : [ ' /* width < 800px */ ' , { tag : 'hr' } , ' test' ] }
212
+ ] ) ;
213
+ } ) ;
214
+
215
+ it ( 'should be parse style contents are split with "<" in comment' , function ( ) {
216
+ const html = `<style> /* width < 800px */ @media (max-width: 800px) { /* selectors */} </style>`
217
+ expect ( parser ( html ) ) . to . eql ( [
218
+ { tag : 'style' , content : [ ' /* width < 800px */ @media (max-width: 800px) { /* selectors */} ' ] }
219
+ ] ) ;
220
+ } ) ;
207
221
} ) ;
You can’t perform that action at this time.
0 commit comments