stray-ending.js 476 B

1234567891011121314151617
  1. // stray ending tags should just be ignored in non-strict mode.
  2. // https://github.com/isaacs/sax-js/issues/32
  3. require(__dirname).test
  4. ( { xml :
  5. "<a><b></c></b></a>"
  6. , expect :
  7. [ [ "opentag", { name: "A", attributes: {}, isSelfClosing: false } ]
  8. , [ "opentag", { name: "B", attributes: {}, isSelfClosing: false } ]
  9. , [ "text", "</c>" ]
  10. , [ "closetag", "B" ]
  11. , [ "closetag", "A" ]
  12. ]
  13. , strict : false
  14. , opt : {}
  15. }
  16. )