{"id":24983665,"url":"https://github.com/posthtml/posthtml-md2html","last_synced_at":"2025-04-11T20:51:33.428Z","repository":{"id":42916169,"uuid":"248688870","full_name":"posthtml/posthtml-md2html","owner":"posthtml","description":"Render markdown inside html elements. ","archived":false,"fork":false,"pushed_at":"2022-03-26T08:41:14.000Z","size":1149,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T21:06:06.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/posthtml.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-20T06:59:17.000Z","updated_at":"2021-08-12T06:39:19.000Z","dependencies_parsed_at":"2022-09-14T09:21:19.437Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-md2html","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"posthtml/posthtml-plugin-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-md2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-md2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-md2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-md2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-md2html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480512,"owners_count":21110936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-02-04T09:20:16.098Z","updated_at":"2025-04-11T20:51:33.399Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","readme":"# posthtml-md2html \u003cimg align=\"right\" width=\"220\" height=\"200\" title=\"PostHTML logo\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n\n[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Build][build]][build-badge]\n[![Coverage][cover]][cover-badge]\n[![Standard Code Style][style]][style-url]\n[![Chat][chat]][chat-badge]\n\n[posthtml-md2html] is a markdown plugin for [PostHTML] that lets you use markdown within HTML elements in an easy and intuitive way. \n\nMain features:\n\n- Works on any tag with a `md` or `markdown` property\n- Knows when to write inline or block-level content\n- Will replace element if tag is `\u003cmd\u003e` or `\u003cmarkdown\u003e`\n- Will treat `pre` tag with `md` or `markdown` property as `\u003cmd\u003e` tag\n\nBefore:\n``` html\n\u003cmarkdown\u003e# Heading with *italics*\u003c/markdown\u003e\n\u003cmarkdown\u003e**Bold** paragraph\u003c/markdown\u003e\n\u003cdiv markdown\u003e\n\n  | Head | row |\n  |------|-----|\n  | Data | row |\n\n\u003c/div\u003e\n\u003cmain markdown\u003e\n\u003e # Title\n\u003e\n\u003e This is blockquote paragraph\n\u003c/main\u003e\n```\n\nAfter:\n``` html\n\u003ch1 id=\"heading-with-italics\"\u003eHeading with \u003cem\u003eitalics\u003c/em\u003e\u003c/h1\u003e\n\n\u003cp\u003e\u003cstrong\u003eBold\u003c/strong\u003e paragraph\u003c/p\u003e\n\n\u003cdiv\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eHead\u003c/th\u003e\n\u003cth\u003erow\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\u003ctr\u003e\n\u003ctd\u003eData\u003c/td\u003e\n\u003ctd\u003erow\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003c/div\u003e\n\u003cmain\u003e\u003cblockquote\u003e\n\u003ch1 id=\"title\"\u003eTitle\u003c/h1\u003e\n\u003cp\u003eThis is blockquote paragraph\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c/main\u003e\n```\n\n\n## Install\n\n```bash\nnpm i -S posthtml posthtml-md2html\n```\n\n\u003e **Note:** This project is compatible with node v10+\n\n## Usage\n\n``` js\nconst fs = require('fs');\nconst posthtml = require('posthtml');\nconst posthtmlPlugin = require('posthtml-md2html');\n\nposthtml()\n    .use(posthtmlPlugin({ /* options */ }))\n    .process(html/*, options */)\n    .then(result =\u003e fs.writeFileSync('./after.html', result.html));\n```\n\n## Options\n\nAll options are passed to [marked](https://github.com/markedjs/marked) directly\n\n### Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs) and [contribution guide](CONTRIBUTING.md).\n\n[npm]: https://img.shields.io/npm/v/posthtml-md2html.svg\n[npm-url]: https://npmjs.com/package/posthtml-md2html\n\n[deps]: https://david-dm.org/posthtml/posthtml-md2html.svg\n[deps-url]: https://david-dm.org/posthtml/posthtml-md2html\n\n[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg\n[style-url]: http://standardjs.com/\n\n[build]: https://travis-ci.org/posthtml/posthtml-md2html.svg?branch=master\n[build-badge]: https://travis-ci.org/posthtml/posthtml-md2html?branch=master\n\n[cover]: https://coveralls.io/repos/posthtml/posthtml-md2html/badge.svg?branch=master\n[cover-badge]: https://coveralls.io/r/posthtml/posthtml-md2html?branch=master\n\n\n[chat]: https://badges.gitter.im/posthtml/posthtml.svg\n[chat-badge]: https://gitter.im/posthtml/posthtml?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\"\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-md2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-md2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-md2html/lists"}