micromark-util-html-tag-name is a low-level utility package within the `micromark` ecosystem, providing curated lists of HTML tag names relevant for CommonMark-compliant Markdown parsing. Specifically, it exports `htmlBlockNames` and `htmlRawNames`, which are used by `micromark` to apply specific parsing rules for HTML (flow) constructs. The `htmlBlockNames` array aids in determining when more relaxed parsing rules apply, based on CommonMark's condition 6, while `htmlRawNames` guides the parser on when HTML content can include lines without exiting until a matching closing tag is found (CommonMark's condition 1). This package is currently in its stable version 2.0.1 and is actively maintained as part of the `micromark` monorepo, which generally sees frequent updates, often with performance enhancements, and drops support for unmaintained Node.js versions with new major releases. It's designed for developers building or extending `micromark` itself, rather than for general HTML tag lookup.
npm install micromark-util-html-tag-nameVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and access the `htmlBlockNames` and `htmlRawNames` arrays, detailing their purpose within the micromark parser's logic for handling HTML tags based on CommonMark specifications.
Migrate your project to use ES modules and ensure Node.js 16+ is used. Replace `require()` calls with `import` statements.
Upgrade your Node.js environment to a currently maintained version (e.g., Node.js 16+ for v2.x).
Understand that these lists reflect CommonMark specifications for Markdown parsing, not general HTML standards. Consult HTML specifications or dedicated HTML parsing libraries for broader use cases.
Be aware that new CommonMark versions may introduce or remove tags from these lists. If you're building custom extensions, ensure compatibility with the CommonMark version `micromark` targets.
Update your import statement to `import { htmlBlockNames, htmlRawNames } from 'micromark-util-html-tag-name';` and ensure your environment supports ES modules.Correct the import to explicitly use the named exports `htmlBlockNames` and `htmlRawNames`: `import { htmlBlockNames, htmlRawNames } from 'micromark-util-html-tag-name';`.No dependency data recorded yet.