Skip to content

ignoreDeclaration does not ignore lower case doctype declaration #870

Description

@luaVolk
  • Are you running the latest version?
  • Have you included sample input, output, error, and expected output?
  • Have you checked if you are using correct configuration?
  • Did you try online tool?
  • Have you checked the docs for helpful APIs and examples?

Description

ignoreDeclaration does not ignore lower case doctype declaration.

Input

Code

const html = `<!doctype html><html></html>`;

const parser = new XMLParser({
  ignoreDeclaration: true,
});
let jObj = parser.parse(html);

console.log(jObj);

Output

{ '!doctype': { html: '' } }

expected data

{ html: '' }

Would you like to work on this issue?

  • Yes
  • No

Bookmark this repository for further updates. Visit SoloThought to know about recent features.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions