-
-
Notifications
You must be signed in to change notification settings - Fork 395
Closed
Labels
Description
<p>foo</p>
<hr>
<p>bar</p>
correctly produces:
[ { type: 'tag',
name: 'p',
attribs: {},
children: [ { data: 'foo', type: 'text' } ] },
{ data: '\n', type: 'text' },
{ type: 'tag',
name: 'hr',
attribs: {},
children: [] },
{ data: '\n', type: 'text' },
{ type: 'tag',
name: 'p',
attribs: {},
children: [ { data: 'bar', type: 'text' } ] } ]
while
<p>foo</p>
<HR>
<p>bar</p>
incorrectly results in:
[ { type: 'tag',
name: 'p',
attribs: {},
children: [ { data: 'foo', type: 'text' } ] },
{ data: '\n', type: 'text' },
{ type: 'tag',
name: 'HR',
attribs: {},
children:
[ { data: '\n', type: 'text' },
{ type: 'tag',
name: 'p',
attribs: {},
children: [ { data: 'bar', type: 'text' } ] } ] } ]
Since HTML tag names are entirely case insensitive I think it would be better to lower case them so that <hr>
and <HR>
would both result in identical parsed output?