{"id":13714994,"url":"https://github.com/egoist/md","last_synced_at":"2025-04-09T22:18:56.516Z","repository":{"id":45275366,"uuid":"87642705","full_name":"egoist/md","owner":"egoist","description":"A markdown parser and compiler. Built for speed.","archived":false,"fork":false,"pushed_at":"2021-12-25T14:06:25.000Z","size":130,"stargazers_count":131,"open_issues_count":5,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T15:09:43.983Z","etag":null,"topics":["compiler","html","markdown","marked","parser"],"latest_commit_sha":null,"homepage":"","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/egoist.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}},"created_at":"2017-04-08T15:12:18.000Z","updated_at":"2024-08-28T00:54:46.000Z","dependencies_parsed_at":"2022-09-14T05:00:48.823Z","dependency_job_id":null,"html_url":"https://github.com/egoist/md","commit_stats":null,"previous_names":["egoist/marked3","egoist/mmark"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egoist","download_url":"https://codeload.github.com/egoist/md/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248049881,"owners_count":21039285,"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":["compiler","html","markdown","marked","parser"],"created_at":"2024-08-03T00:00:52.808Z","updated_at":"2025-04-09T22:18:56.495Z","avatar_url":"https://github.com/egoist.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# md\n\n[![NPM version](https://img.shields.io/npm/v/md.svg?style=flat)](https://npmjs.com/package/md) [![NPM downloads](https://img.shields.io/npm/dm/md.svg?style=flat)](https://npmjs.com/package/md) [![Build Status](https://img.shields.io/circleci/project/egoist/md/master.svg?style=flat)](https://circleci.com/gh/egoist/md) [![codecov](https://codecov.io/gh/egoist/md/branch/master/graph/badge.svg)](https://codecov.io/gh/egoist/md)\n [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026style=flat)](https://github.com/egoist/donate)\n\n\u003e This is a fork of [marked](https://github.com/markedjs/marked)\n\n**Why?**\n\n- Actively maintained\n- Rewrote in ES6 and bundled with Rollup for smaller size (15KB)\n- Support more GFM extras like [task lists](https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments)\n\n## Install\n\n```bash\nyarn add md\n```\n\nYou can find a CDN version at https://unpkg.com/md/\n\n## Usage\n\n```js\nconst md = require('md')\n\nconst html = md(`## hello world\n\nA modern **markdown** parser!\n\n- [ ] todo\n- [x] done\n`)\n```\n\nYou can preview the HTML result here: https://egoist.moe/md2html/ ([source](https://github.com/egoist/md2html))\n\n## API\n\n### md(src, [options])\n\n#### src\n\nType: `string`\u003cbr\u003e\nRequired: `true`\n\nInput markdown string.\n\n#### options\n\nAll marked [options](https://marked.js.org/#/USING_ADVANCED.md) plus:\n\n##### taskLists\n\nType: `boolean`\u003cbr\u003e\nDefault: `true`\n\nEnable GFM task lists, this will only work if `options.gfm` is `true`.\n\n##### linksInNewTab\n\nType: `boolean | (href: string) =\u003e boolean`\u003cbr\u003e\nDefault: `undefined`\n\nOpen links in a new window/tab.\n\n##### dataLine\n\nType: `boolean`\u003cbr\u003e\nDefault: `true`\n\nAdd `data-line` attribute to `\u003cpre\u003e` tag for code fences, it's useful with the [line-highlight](http://prismjs.com/plugins/line-highlight/) plugin in PrismJS. \n\n````markdown\n```js{1}\nconsole.log('hi')\n```\n````\n\nThis will yield:\n\n```html\n\u003cpre data-line=\"1\"\u003e\u003ccode class=\"lang-js\"\u003econsole.log('hi')\u003c/code\u003e\u003c/pre\u003e\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n\n## Development\n\n```bash\n# lint and unit test\nyarn test\n\n# lint only\nyarn lint\n\n# fix lint issues\nyarn lint -- --fix\n```\n\n## Author\n\n**md** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.\u003cbr\u003e\nAuthored and maintained by egoist with help from contributors ([list](https://github.com/egoist/md/contributors)).\n\n\u003e [egoist.moe](https://egoist.moe) · GitHub [@egoist](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Fmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegoist%2Fmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Fmd/lists"}