mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
52 lines
755 B
JavaScript
52 lines
755 B
JavaScript
|
// stray ending tags should just be ignored in non-strict mode.
|
||
|
// https://github.com/isaacs/sax-js/issues/32
|
||
|
require(__dirname).test({
|
||
|
xml: '<a><b></c></b></a>',
|
||
|
expect: [
|
||
|
[
|
||
|
'opentagstart',
|
||
|
{
|
||
|
name: 'A',
|
||
|
attributes: {}
|
||
|
}
|
||
|
],
|
||
|
[
|
||
|
'opentag',
|
||
|
{
|
||
|
name: 'A',
|
||
|
attributes: {},
|
||
|
isSelfClosing: false
|
||
|
}
|
||
|
],
|
||
|
[
|
||
|
'opentagstart',
|
||
|
{
|
||
|
name: 'B',
|
||
|
attributes: {}
|
||
|
}
|
||
|
],
|
||
|
[
|
||
|
'opentag',
|
||
|
{
|
||
|
name: 'B',
|
||
|
attributes: {},
|
||
|
isSelfClosing: false
|
||
|
}
|
||
|
],
|
||
|
[
|
||
|
'text',
|
||
|
'</c>'
|
||
|
],
|
||
|
[
|
||
|
'closetag',
|
||
|
'B'
|
||
|
],
|
||
|
[
|
||
|
'closetag',
|
||
|
'A'
|
||
|
]
|
||
|
],
|
||
|
strict: false,
|
||
|
opt: {}
|
||
|
})
|