{"id":13515588,"url":"https://github.com/remarkjs/remark-html","last_synced_at":"2026-04-07T04:31:39.686Z","repository":{"id":34044314,"uuid":"37818218","full_name":"remarkjs/remark-html","owner":"remarkjs","description":"plugin to add support for serializing HTML","archived":false,"fork":false,"pushed_at":"2023-09-24T18:33:06.000Z","size":322,"stargazers_count":339,"open_issues_count":0,"forks_count":18,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-04-01T08:18:46.202Z","etag":null,"topics":["html","markdown","remark","remark-plugin"],"latest_commit_sha":null,"homepage":"https://remark.js.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remarkjs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"unifiedjs","open_collective":"unified"}},"created_at":"2015-06-21T17:24:17.000Z","updated_at":"2025-12-17T16:02:19.000Z","dependencies_parsed_at":"2024-01-13T19:25:28.459Z","dependency_job_id":"eafebc59-3de1-4812-b533-567389e6254c","html_url":"https://github.com/remarkjs/remark-html","commit_stats":{"total_commits":206,"total_committers":8,"mean_commits":25.75,"dds":0.04854368932038833,"last_synced_commit":"d38452549d9c01e4cb4516ee2acfdd3b210f62be"},"previous_names":["wooorm/mdast-html"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/remarkjs/remark-html","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remarkjs","download_url":"https://codeload.github.com/remarkjs/remark-html/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-html/sbom","scorecard":{"id":770066,"data":{"date":"2025-08-11","repo":{"name":"github.com/remarkjs/remark-html","commit":"b63ddf4d1828ea28ce3f232c19236176dfb5f549"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/bb.yml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/bb.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-html/bb.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-html/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-html/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-html/main.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/remarkjs/.github/security.md:1","Info: Found linked content: github.com/remarkjs/.github/security.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/remarkjs/.github/security.md:1","Info: Found text in security policy: github.com/remarkjs/.github/security.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T01:58:28.182Z","repository_id":34044314,"created_at":"2025-08-23T01:58:28.183Z","updated_at":"2025-08-23T01:58:28.183Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","markdown","remark","remark-plugin"],"created_at":"2024-08-01T05:01:13.161Z","updated_at":"2026-04-07T04:31:39.661Z","avatar_url":"https://github.com/remarkjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":["JavaScript"],"sub_categories":[],"readme":"# remark-html\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[remark][]** plugin to add support for serializing HTML.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(remarkHtml[, options])`](#unifieduseremarkhtml-options)\n    *   [`Options`](#options)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([remark][]) plugin that compiles markdown to\nHTML.\n\n## When should I use this?\n\nThis plugin is useful when you want to turn markdown into HTML.\nIt’s a shortcut for\n`.use(remarkRehype).use(rehypeSanitize).use(rehypeStringify)`.\n\nThe reason that there are different ecosystems for markdown and HTML is that\nturning markdown into HTML is, while frequently needed, not the only purpose of\nmarkdown.\nChecking (linting) and formatting markdown are also common use cases for\nremark and markdown.\nThere are several aspects of markdown that do not translate 1-to-1 to HTML.\nIn some cases markdown contains more information than HTML: for example, there\nare several ways to add a link in markdown (as in, autolinks: `\u003chttps://url\u003e`,\nresource links: `[label](url)`, and reference links with definitions:\n`[label][id]` and `[id]: url`).\nIn other cases HTML contains more information than markdown: there are many\ntags, which add new meaning (semantics), available in HTML that aren’t available\nin markdown.\nIf there was just one AST, it would be quite hard to perform the tasks that\nseveral remark and rehype plugins currently do.\n\nThis plugin is useful when you want to quickly turn markdown into HTML.\nIn most cases though, it’s recommended to use [`remark-rehype`][remark-rehype]\ninstead and finally use [`rehype-stringify`][rehype-stringify] to serialize\nHTML.\nThe reason using both ecosystems instead of this plugin is recommended, is that\nthere are many useful rehype plugins that you can then use.\nFor example, you can [minify HTML][rehype-minify], [format HTML][rehype-format],\n[highlight code][rehype-highlight], [add metadata][rehype-meta], and a lot more.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install remark-html\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport remarkHtml from 'https://esm.sh/remark-html@16'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import remarkHtml from 'https://esm.sh/remark-html@16?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nSay we have the following file `example.md`:\n\n```markdown\n# Pluto\n\n**Pluto** (minor-planet designation: **134340 Pluto**) is a\n[dwarf planet](https://en.wikipedia.org/wiki/Dwarf_planet) in the\n[Kuiper belt](https://en.wikipedia.org/wiki/Kuiper_belt).\n```\n\n…and a module `example.js`:\n\n```js\nimport remarkHtml from 'remark-html'\nimport remarkParse from 'remark-parse'\nimport {read} from 'to-vfile'\nimport {unified} from 'unified'\n\nconst file = await unified()\n  .use(remarkParse)\n  .use(remarkHtml)\n  .process(await read('example.md'))\n\nconsole.log(String(file))\n```\n\n…then running `node example.js` yields:\n\n```html\n\u003ch1\u003ePluto\u003c/h1\u003e\n\u003cp\u003e\u003cstrong\u003ePluto\u003c/strong\u003e (minor-planet designation: \u003cstrong\u003e134340 Pluto\u003c/strong\u003e) is a\n\u003ca href=\"https://en.wikipedia.org/wiki/Dwarf_planet\"\u003edwarf planet\u003c/a\u003e in the\n\u003ca href=\"https://en.wikipedia.org/wiki/Kuiper_belt\"\u003eKuiper belt\u003c/a\u003e.\u003c/p\u003e\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`remarkHtml`][api-remark-html].\n\n### `unified().use(remarkHtml[, options])`\n\nSerialize markdown as HTML.\n\n###### Parameters\n\n*   `options` ([`Options`][api-options], optional)\n    — configuration\n\n###### Returns\n\nTransform ([`Transformer`][unified-transformer]).\n\n###### Notes\n\nPassing `sanitize: false` is dangerous.\nIt allows arbitrary HTML and does not sanitize elements.\n\n### `Options`\n\nConfiguration (TypeScript type).\n\n###### Fields\n\n*   `handlers` ([`Handlers` from\n    `mdast-util-to-hast`][mdast-util-to-hast-handlers], optional)\n    — how to turn mdast nodes into hast nodes\n*   `sanitize` ([`Schema` from\n    `hast-util-sanitize`][hast-util-sanitize-schema] or `boolean`, default:\n    `true`)\n    — sanitize the output, and how\n*   `...toHtmlOptions` ([`Options` from\n    `hast-util-to-html`][hast-util-to-html-options], optional)\n    — other options are passed to `hast-util-to-html`\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type [`Options`][api-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `remark-html@^16`,\ncompatible with Node.js 16.\n\nThis plugin works with `unified` version 6+ and `remark` version 15+.\n\n## Security\n\nUse of `remark-html` is safe by default.\nPassing `sanitize: false` is unsafe and opens you up to\n[cross-site scripting (XSS)][wiki-xss] attacks.\nA safe schema is used by default, but passing an unsafe schema is unsafe.\n\n## Related\n\n*   [`remark-rehype`](https://github.com/remarkjs/remark-rehype)\n    — turn markdown into HTML to support rehype\n*   [`rehype-sanitize`](https://github.com/rehypejs/rehype-sanitize)\n    — sanitize HTML\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/remarkjs/remark-html/workflows/main/badge.svg\n\n[build]: https://github.com/remarkjs/remark-html/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-html.svg\n\n[coverage]: https://codecov.io/github/remarkjs/remark-html\n\n[downloads-badge]: https://img.shields.io/npm/dm/remark-html.svg\n\n[downloads]: https://www.npmjs.com/package/remark-html\n\n[size-badge]: https://img.shields.io/bundlejs/size/remark-html\n\n[size]: https://bundlejs.com/?q=remark-html\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/remarkjs/remark/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[health]: https://github.com/remarkjs/.github\n\n[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[hast-util-sanitize-schema]: https://github.com/syntax-tree/hast-util-sanitize#schema\n\n[hast-util-to-html-options]: https://github.com/syntax-tree/hast-util-to-html#options\n\n[mdast-util-to-hast-handlers]: https://github.com/syntax-tree/mdast-util-to-hast#handlers\n\n[rehype-format]: https://github.com/rehypejs/rehype-format\n\n[rehype-highlight]: https://github.com/rehypejs/rehype-highlight\n\n[rehype-meta]: https://github.com/rehypejs/rehype-meta\n\n[rehype-minify]: https://github.com/rehypejs/rehype-minify\n\n[rehype-stringify]: https://github.com/rehypejs/rehype/tree/main/packages/rehype-stringify\n\n[remark]: https://github.com/remarkjs/remark\n\n[remark-rehype]: https://github.com/remarkjs/remark-rehype\n\n[typescript]: https://www.typescriptlang.org\n\n[unified]: https://github.com/unifiedjs/unified\n\n[unified-transformer]: https://github.com/unifiedjs/unified#transformer\n\n[wiki-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[api-options]: #options\n\n[api-remark-html]: #unifieduseremarkhtml-options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremarkjs%2Fremark-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremarkjs%2Fremark-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremarkjs%2Fremark-html/lists"}