{"id":17239020,"url":"https://github.com/binarymuse/electron-markdown","last_synced_at":"2025-04-14T02:32:57.271Z","repository":{"id":37801036,"uuid":"171484307","full_name":"BinaryMuse/electron-markdown","owner":"BinaryMuse","description":"Convert GitHub-flavored Markdown to HTML with a few extras","archived":false,"fork":false,"pushed_at":"2023-03-07T14:56:52.000Z","size":562,"stargazers_count":10,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T02:44:21.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/electron-markdown","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BinaryMuse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-19T14:04:20.000Z","updated_at":"2024-11-11T15:28:19.000Z","dependencies_parsed_at":"2024-06-21T15:44:44.563Z","dependency_job_id":null,"html_url":"https://github.com/BinaryMuse/electron-markdown","commit_stats":{"total_commits":175,"total_committers":4,"mean_commits":43.75,"dds":"0.26857142857142857","last_synced_commit":"c1db378b41601976e33bb6ce0ac17652f555d836"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Felectron-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Felectron-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Felectron-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryMuse%2Felectron-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinaryMuse","download_url":"https://codeload.github.com/BinaryMuse/electron-markdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240142797,"owners_count":19754636,"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":"2024-10-15T05:47:31.483Z","updated_at":"2025-02-24T15:30:28.244Z","avatar_url":"https://github.com/BinaryMuse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-markdown\n\nelectron-markdown is a Node.js module to convert Markdown to HTML. It uses\n[cmark-gfm](https://www.npmjs.com/package/cmark-gfm) for HTML generation, and a\nseries of [unified](https://github.com/unifiedjs/unified) plugins to process the\nresulting HTML.\n\n## Installation\n\nSupports Node.js v12 or higher.\n\n```bash\nnpm install electron-markdown\n```\n\n## Usage\n\nelectron-markdown exports a single function, which takes a Markdown string as\nits first argument and an options object as its second argument, and returns a\nPromise that resolves to the resulting HTML.\n\n`resultPromise = electronMarkdown(markdown[, options])`\n\n- `result: Promise\u003cString\u003e` - a Promise resolving to the resulting HTML if\n  parsing and rendering succeeds\n- `markdown: String` - a string of Markdown to render to HTML\n- `options: Object`\n  - `runBefore` Array of [remark] plugins - Custom plugins to be run before the\n    commonly used plugins.\n  - `cmark` options to pass to\n    [cmark-gfm](https://github.com/BinaryMuse/node-cmark-gfm#options); will be\n    deeply merged with the default options\n  - `highlight` - Object of\n    [rehype-highlight](https://github.com/rehypejs/rehype-highlighthighlight#options)\n    options.\n\nDefault options:\n\n```javascript\n{\n  cmark: {\n    footnotes: true,\n    extensions: {\n      table: true,\n      strikethrough: true,\n      autolink: true,\n      tagfilter: true\n    }\n  },\n  highlight: {\n    ignoreMissing: true,\n    aliases: {\n      plaintext: ['text'],\n    },\n  },\n}\n```\n\nTo disable an option or extension that is enabled by default, provide your own\noptions with a value of `false` (or an `extensions` object with the given\nextension's value set to `false`). Any options you provide will be merged into\nthe default options, with `false` values overriding any default `true` value.\n\n```javascript\nconst markdownToHtml = require('electron-markdown')\n\nmarkdownToHtml(someMarkdown).then(\n  function (html) {\n    console.log(html)\n  },\n  function (err) {\n    console.error(err)\n  }\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarymuse%2Felectron-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarymuse%2Felectron-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarymuse%2Felectron-markdown/lists"}