{"id":21994254,"url":"https://github.com/jhuix/showdowns","last_synced_at":"2026-02-27T13:23:54.038Z","repository":{"id":57121224,"uuid":"217963503","full_name":"jhuix/showdowns","owner":"jhuix","description":"A lib that make markdown to html with some extensions of showdown.js.","archived":false,"fork":false,"pushed_at":"2026-01-10T03:32:19.000Z","size":26592,"stargazers_count":33,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-11T00:59:20.965Z","etag":null,"topics":["abc","abcjs","diagrams-extensions","echarts","flowchart","html","katex","markdown","mermaid","plantuml","railroad","sequence","showdown","showdown-extensions","showdowns","toc","vega","viz","wavedrom"],"latest_commit_sha":null,"homepage":"https://jhuix.github.io/showdowns","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhuix.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-28T04:04:11.000Z","updated_at":"2026-01-10T03:32:23.000Z","dependencies_parsed_at":"2025-01-10T12:41:01.835Z","dependency_job_id":"2e1c5c05-7d27-46a1-9f76-8b7b009e4eab","html_url":"https://github.com/jhuix/showdowns","commit_stats":{"total_commits":161,"total_committers":1,"mean_commits":161.0,"dds":0.0,"last_synced_commit":"1237a22e0b3252826ef61f3623eee7792a97f2b0"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/jhuix/showdowns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Fshowdowns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Fshowdowns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Fshowdowns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Fshowdowns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhuix","download_url":"https://codeload.github.com/jhuix/showdowns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Fshowdowns/sbom","scorecard":{"id":519279,"data":{"date":"2025-08-11","repo":{"name":"github.com/jhuix/showdowns","commit":"e9a22f63ea530581d5d8111867dfd58a2b3451f7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Maintained","score":10,"reason":"28 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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"}}]},"last_synced_at":"2025-08-20T02:33:53.188Z","repository_id":57121224,"created_at":"2025-08-20T02:33:53.188Z","updated_at":"2025-08-20T02:33:53.188Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["abc","abcjs","diagrams-extensions","echarts","flowchart","html","katex","markdown","mermaid","plantuml","railroad","sequence","showdown","showdown-extensions","showdowns","toc","vega","viz","wavedrom"],"created_at":"2024-11-29T21:08:07.835Z","updated_at":"2026-02-27T13:23:54.024Z","avatar_url":"https://github.com/jhuix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://jhuix.github.io/showdowns\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"128\" src=\"https://jhuix.github.io/showdowns/logo.png\" alt=\"showdowns logo\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eShowdowns\u003c/h1\u003e\n\n[Showdowns](https://github.com/jhuix/showdowns) is a lib that make markdown to html with some extensions features(include more diagrams extensions) of showdown.js.\n\n**In browser environment, it is implemented to dynamically load js lib files related to more showdown diagrams extension for using [showdowns \u003e= 0.3.0 version](https://github.com/jhuix/showdowns).**\n\n\u003e If you think the showdowns library can help you or also hope to encourage the author, click on the top right corner to give me a [Star](https://github.com/jhuix/showdowns)⭐️.\n\n## Markdown To Html\n\n[Showdowns](https://github.com/jhuix/showdowns) can converte markdown content to html that using the [showdown.js](https://github.com/showdownjs/showdown).\n\n[Showdown](https://github.com/showdownjs/showdown) is a Javascript Markdown to HTML converter, based on the original works by John Gruber. Showdown can be used client side (in the browser) or server side (with NodeJs). For more information, refer to the following document:\n\n- [Showdowns Features Syntax](https://jhuix.github.io/showdowns/demo/index.html)\n- [Showdown's Markdown Syntax](https://github.com/showdownjs/showdown/wiki/Showdown's-Markdown-syntax)\n- [Showdown Options](https://github.com/showdownjs/showdown/wiki/Showdown-options)\n\n### Live Demo Editor —— `showdowns-editor`\n\nCheck a live demo editor here https://jhuix.github.io/vue-showdowns-editor\n\n### Table Extension\n\n- The following features are extended based on the showdown's table:\n\n  - Cell spans over columns\n  - Cell spans over rows (optional)\n  - Omitted table header (optional)\n\n- Showdown's table\n\ncell style syntax has \"-{2,}\",\":-{2,}\",\":-{2,}:\",\"-{2,}:\", means default (align left), align left, align center, and align right style\n\n    | Return Code | Style | Value | DESC      |\n    | ----------- | :-----: | :----- | ---------: |\n    | OK          | int   | 1     | Succeeded |\n    | ERROR       | int   | 0     | Failed '\\|'    |\n\n| Return Code | Style | Value | DESC      |\n| ----------- | :-----: | :----- | ---------: |\n| OK          | int   | 1     | Succeeded |\n| ERROR       | int   | 0     | Failed    |\n\n- Colspan table\n\n\"||\" indicates cells being merged left.\n\n    | Return Code | Style | Value | DESC      |\n    | ====== | :-----: | ===== | ===== |\n    | **OK**          | int   | 1     | [Succeeded](https://www.baidu.com) |\n    | ERROR       | int   | 0     ||\n    | ERROR       || 0     ||\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth id=\"return_code\"\u003eReturn Code\u003c/th\u003e\n\u003cth id=\"style\" style=\"text-align:center;\"\u003eStyle\u003c/th\u003e\n\u003cth id=\"value\"\u003eValue\u003c/th\u003e\n\u003cth id=\"desc\"\u003eDESC\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eOK\u003c/strong\u003e\u003c/td\u003e\n\u003ctd style=\"text-align:center;\"\u003eint\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://www.baidu.com\"\u003eSucceeded\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eERROR\u003c/td\u003e\n\u003ctd style=\"text-align:center;\"\u003eint\u003c/td\u003e\n\u003ctd colspan=\"2\"\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"2\"\u003eERROR\u003c/td\u003e\n\u003ctd colspan=\"2\"\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n- Rowspan table (optional: tablesRowspan)\n\n\"^^\" indicates cells being merged above.\n\n    | Return Code | Style | Value | DESC      |\n    | ====== | :-----: | ===== | ===== |\n    | ^^         || 1     | [Succeeded](https://www.baidu.com) |\n    | ^^       || 0     ||\n    | ERROR       | int   | 0     ||\n    | ERROR       || 0     ||\n    | ^^       || 0     ||\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth id=\"return_code\"\u003eReturn Code\u003c/th\u003e\n\u003cth id=\"style\" style=\"text-align:center;\"\u003eStyle\u003c/th\u003e\n\u003cth id=\"value\"\u003eValue\u003c/th\u003e\n\u003cth id=\"desc\"\u003eDESC\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd rowspan=\"2\" colspan=\"2\"\u003e^^\u003c/td\u003e\n\u003ctd\u003e1\u003c/td\u003e\n\u003ctd\u003e\u003ca href=\"https://www.baidu.com\"\u003eSucceeded\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"2\"\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eERROR\u003c/td\u003e\n\u003ctd style=\"text-align:center;\"\u003eint\u003c/td\u003e\n\u003ctd colspan=\"2\"\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd rowspan=\"2\" colspan=\"2\"\u003eERROR\u003c/td\u003e\n\u003ctd colspan=\"2\"\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd colspan=\"2\"\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n- Headerless table (optional: tablesHeaderless)\n\nTable header can be eliminated.\n\n    |--|--|--|--|--|--|--|--|\n    |♜|  |♝|♛|♚|♝|♞|♜|\n    |  |♟|♟|♟|  |♟|♟|♟|\n    |♟|  |♞|  |  |  |  |  |\n    |  |♗|  |  |♟|  |  |  |\n    |  |  |  |  |♙|  |  |  |\n    |  |  |  |  |  |♘|  |  |\n    |♙|♙|♙|♙|  |♙|♙|♙|\n    |♖|♘|♗|♕|♔|  |  |♖|\n\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e♜\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♝\u003c/td\u003e\n\u003ctd\u003e♛\u003c/td\u003e\n\u003ctd\u003e♚\u003c/td\u003e\n\u003ctd\u003e♝\u003c/td\u003e\n\u003ctd\u003e♞\u003c/td\u003e\n\u003ctd\u003e♜\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♞\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♗\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♟\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♘\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003ctd\u003e♙\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e♖\u003c/td\u003e\n\u003ctd\u003e♘\u003c/td\u003e\n\u003ctd\u003e♗\u003c/td\u003e\n\u003ctd\u003e♕\u003c/td\u003e\n\u003ctd\u003e♔\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003e♖\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Supporting some markdown extension features\n\n[Footnotes](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#footnotes)\n\n[Directives](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#directives)\n\n[CSS defined](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#css-defined)\n\n[Inline Image](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#inline-image)\n\n[Table of Contents](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#table-of-contents)\n\n[LaTeX math and AsciiMath](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#latex-math-and-asciimath)\n\n[Code Block Theme](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#code-block-theme)\n\n[Mermaid](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#mermaid)\n\n[Plantuml](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#plantuml)\n\n[Flowchart](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#flowchart)\n\n[Network Sequence](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#network-sequence)\n\n[Graphviz's dot](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#graphviz-s-dot)\n\n[Railroad diagrams](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#railroad-diagrams)\n\n[WaveDrom](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#wavedrom)\n\n[Vega and Vega-Lite](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#vega-and-vega-lite)\n\n[Echarts](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#echarts)\n\n[ABCJS](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#abc)\n\n[Kroki](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#kroki)\n\n[Plotly](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#plotly)\n\n[AntV Infographic](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#antv-infographic)\n\n[ZenUML](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md#zenuml)\n\nSee more information, refer to the following document:\n\n[Extensions Examples](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md)\n\n### Preview\n\n- View [Extensions Examples](https://github.com/jhuix/showdowns/blob/master/docs/showdowns-features.md) is previewed as [Showdowns Features](https://jhuix.github.io/showdowns/)\n\n- View video\n\n[![demovideo](https://jhuix.github.io/showdowns/media/demo-video.jpg)](https://jhuix.github.io/showdowns/media/demo.mp4)\n\n## Usage\n\n### Installation\n\n1.  Using npm:\n\n        npm install @jhuix/showdowns\n\n    Note: add --save if you are using npm \u003c 5.0.0\n\n2.  In a browser:\n\n    put the following line into your HTML page \\\u003cheader\u003e or \\\u003cbody\u003e:\n\n        \u003clink rel=\"stylesheet\" href=\"dist/showdowns.min.css\"\u003e\n        \u003cscript src=\"dist/showdowns.min.js\"\u003e\u003c/script\u003e\n\n3.  In Node.js:\n\n    For commonjs\n\n        var showdowns = require('showdowns');\n\n    or\n\n        import 'showdowns/dist/showdowns.core.min.css';\n        import showdowns from 'showdowns';\n\n    For umd\n\n        var showdowns = require('showdowns/dist/showdowns.min.js');\n\n    or\n\n        import 'showdowns/dist/showdowns.min.css';\n        import showdowns from 'showdowns/dist/showdowns.min.js';\n\n4.  Support compress markdown content with zip.\n\n### Quick Example\n\n#### Node\n\n    var showdowns = require('showdowns'),\n    showdowns.init()\n    var text = '# hello, markdown!',\n    showdowns.makeHtml(text).then(obj =\u003e {\n      //Do something for 'obj.html' and 'obj.scripts'      \n    });\n\n#### Browser\n\nPut the following line into your HTML page \\\u003cheader\u003e or \\\u003cbody\u003e:\n\n    \u003clink rel=\"stylesheet\" href=\"../dist/showdowns.min.css\" /\u003e\n\n    \u003cdiv id=\"main\" class=\"workspace-container\"\u003e\u003c/div\u003e\n    \u003cscript src=\"../dist/showdowns.min.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      (function(element) {\n        showdowns.init();\n        let md = \"\";\n        window\n          .fetch(\"https://jhuix.github.io/showdowns/showdowns-features.md\")\n          .then(function(response) {\n            if (response.ok) {\n              return response.text();\n            }\n          })\n          .then(function(text) {\n            md = text;\n            return window.fetch(\n              \"https://jhuix.github.io/showdowns/Showdown's-Markdown-syntax.md\"\n            );\n          })\n          .then(function(response) {\n            if (response.ok) {\n              return response.text();\n            }\n          })\n          .then(function(text) {\n            md = md + `\\n\\n## Showdown's Markdown syntax\\n\\n` + text;\n            showdowns.makeHtml({content: md, output: 'dom'}).then(res =\u003e {\n                if (typeof res === 'string') {\n                  element.innerHTML = res;\n                }else if (Array.isArray(res.html)) {\n                  element.replaceChildren();\n                  res.html.forEach((e)=\u003e{\n                    element.appendChild(e);\n                  })\n                  showdowns.completedHtml(res.scripts, '.showdowns');\n                }\n              showdowns.completedHtml(obj.scripts, '.showdowns');\n            }).catch(err =\u003e{\n              element.innerHTML = '';\n              console.log(err);\n            });\n          })\n          .catch(function(error) {\n            console.log(error);\n            if (md) {\n              showdowns.makeHtml(md).then(obj =\u003e {\n                element.innerHTML = obj.html;\n                showdowns.completedHtml(obj.scripts, '.showdowns');\n              }).catch(err =\u003e{\n                element.innerHTML = '';\n                console.log(err);\n              });\n            }\n          });\n      })(document.getElementById(\"main\"));\n    \u003c/script\u003e\n\n### Options\n\n#### defaultOptions\n\nType: {showdown: object, plantuml: object, mermaid: object, katex: object, kroki: object, vega: object, toc: object, tex: object, shiki: object, gnuplot: object }\n\nDefault options is described below:\n\n    defaultOptions = {\n      showdown: {\n        flavor: 'github',\n        mathEngine: 'mathjax',\n      },\n      toc: { chapterNumber: true, title: '', toc: '[\\\\[【]Table[ -]Of[ -]Contents[\\\\]】]|[\\\\[【]目录[\\\\]】]|[\\\\[【]TOC[\\\\]】]|\\\\{\\\\{TOC\\\\}\\\\}' },\n      plantuml: { imageFormat: 'svg' },\n      mermaid: { theme: 'default' },\n      katex: { mathDelimiters: [\n        { left: '$$', right: '$$', display: true },\n        { left: '\\\\[', right: '\\\\]', display: true },\n        { left: \"\\\\begin{equation}\", right: \"\\\\end{equation}\", display: true },\n        { left: \"\\\\begin{align}\", right: \"\\\\end{align}\", display: true },\n        { left: \"\\\\begin{alignat}\", right: \"\\\\end{alignat}\", display: true },\n        { left: \"\\\\begin{gather}\", right: \"\\\\end{gather}\", display: true },\n        { left: \"\\\\begin{CD}\", right: \"\\\\end{CD}\", display: true },      \n        { left: '\\\\(', right: '\\\\)', display: false },\n        { left: '@@', right: '@@', display: true, asciimath: true },\n        { left: \"\\\\$\", right: \"\\\\$\", display: false, asciimath: true }\n      ]},\n      kroki: { serverUrl: 'kroki.io', imageFormat: 'svg' },\n      vega: { theme: 'vox' },\n      tex: { serverUrl: 'tex.io', buildType: 'pdflatex' },\n      shiki: { theme: 'ayu-dark' },\n      gnuplot: {}\n    };\n\n- showdown: showdown options object\n\n  `flavor` - [Flavor of showdown](https://github.com/showdownjs/showdown/blob/master/README.md#flavors), default is 'github'.\n\n  `mathEngine` - Math render engine for 'mathjax' or 'katex', default is 'mathjax'.\n  \n  For more showdown options, refer to the following document:\n\n  [Showdown Options](https://github.com/showdownjs/showdown/blob/master/README.md#options)\n\n- toc: table of content options object\n\n  For more toc options:\n\n      {\n        chapterNumber: true,\n        title: '',\n        toc: '[\\\\[【]Table[ -]Of[ -]Contents[\\\\]】]|[\\\\[【]目录[\\\\]】]|[\\\\[【]TOC[\\\\]】]|\\\\{\\\\{TOC\\\\}\\\\}'\n      }\n\n  `chapterNumber` - Whether show chapter number such as '1.1.', default is true.\n  `title` - Custom defined text content of title, default is empty string indicates auto recognition based on the language(such as '目录' on chinese, 'Table Of Contents' on other language).\n  `toc` - Custom defined regex string of test for table of contents.\n\n\n- plantuml: plantuml options object\n\n  For more plantuml options:\n\n      {\n        umlWebSite: \"www.plantuml.com/plantuml\",\n        imageFormat: \"svg\" | \"png\" | \"jpg\",\n        svgRender: (id:string, code:string, options: {\n          count?: number\n        }) =\u003e string\n      }\n\n- mermaid: mermaid options object\n\n  For more mermaid options, refer to the following document:\n\n  [Mermaid Options](http://mermaid-js.github.io/mermaid/#/mermaidAPI)\n\n- katex: katex options object\n\n  For more katex options, refer to the following document:\n\n  [Katex AutoRender Options](https://katex.org/docs/autorender.html#api)\n  [Katex Render Options](https://katex.org/docs/options.html)\n\n  In addition, mathDelimiters is another format:\n\n      {\n        mathDelimiters: {\n          texmath: {\n            display: [\n               {left: \"$$\", right: \"$$\"},\n               {left: '\\\\[', right: '\\\\]'}\n            ],\n            inline:  [\n              {left: '\\\\(', right: '\\\\)'}\n            ]\n          },\n          asciimath: {\n            display: [ {left: \"@@\", right: \"@@\"}],\n            inline:  [ {left: \"\\\\$ \", right: \"\\\\$\"}]\n          }\n        }\n      }\n\n- kroki: kroki options object\n\n  For more kroki options:\n\n      {\n        serverUrl: \"kroki.io\",\n        imageFormat: \"svg\",\n        svgRender: (id:string, code:string, options: {\n          diagramType: string,\n          imageFormat: string\n        }) =\u003e string\n      }\n\n- vega: vega-embed options object\n\n  For more vega-embed options, refer to the following document:\n\n  [Vega-embed Options](https://github.com/vega/vega-embed#options)\n\n- shiki: shiki options object\n\n  For more shiki options:\n\n      {\n        theme: \"ayu-dark\"\n      }\n\n  The theme of shiki see [ShiKi Style](https://shiki.style/themes).\n\n- tex: tex options object\n\n  For more tex options:\n\n      {\n        serverUrl: \"tex.io\",\n        buildType: \"pdflatex\",\n        svgRender: (id:string, code:string, options: {\n          build: string,\n          zoom?: number,\n          width?: string,\n          height?: string\n        }) =\u003e string\n      }\n\n- gnuplot: gnuplot options object\n\n  For more gnuplot options:\n\n      {\n        svgRender: (id:string, code:string) =\u003e string\n      }\n\n#### defaultExtensions\n\nType: Array of showdown extensions\n\nDefault extensions is described below:\n\n    defaultExtensions = {\n      'showdown-toc': showdownToc(options.toc),\n      'showdown-image': showdownImage(),\n      'showdown-align': showdownAlign(),\n      'showdown-footnotes': showdownFootnotes(),\n      'showdown-directive': showdownDirective(),\n      'showdown-sequence': showdownSequence()\n    }\n\nFor more showdown extensions, refer to the following document:\n\n[Showdown Extensions](https://github.com/showdownjs/showdown/blob/master/README.md#extensions)\n\n#### defaultAsyncExtensions\n\nType: Array of showdown async extensions\n\nDefault async extensions is described below:\n\n    defaultAsyncExtensions = {\n      'showdown-toc': getExtension('showdown-toc', showdownToc),\n      'showdown-image': showdownAsyncImage(),\n      'showdown-plantuml': showdownPlantuml(plantumlOptions),\n      'showdown-mermaid': showdownMermaid(mermaidOptions),\n      'showdown-mathjax': showdownMathJax(mathjaxOptions),\n      'showdown-tex': showdownTex(texOptions),\n      'showdown-katex': showdownKatex(katexOptions),\n      'showdown-kroki': showdownKroki(krokiOptions),\n      'showdown-flowchart': showdownFlowchart(),\n      'showdown-viz': showdownViz(),\n      'showdown-vega': showdownVega(vegaOptions),\n      'showdown-wavedrom': showdownWavedrom(),\n      'showdown-railroad': showdownRailroad(),\n      'showdown-abc': showdownAbc(),\n      'showdown-echarts': showdownEcharts(),\n      'showdown-gnuplot': showdownShiki(gnuplotOptions),\n      'showdown-antv': showdownAntV(),\n      'showdown-sequence': getExtension('showdown-sequence', showdownSequence),\n      'showdown-shiki': showdownShiki(shikiOptions),\n      'showdow-css': showdownCss(),\n    }\n\n### Properties\n\n#### showdown\n\nType: showdown\n\nDefault: showdown\n\nOutput showdown.js native object for global.\n\n#### convertor\n\nType: showdown.convertor | null\n\nDefault: null\n\nOutput showdown.convertor native object in current showdowns Instance.\n\n#### eventBus\n\nType: EventBus\n\nDefault: EventBus\n\nA internal event bus object, its method is as follows:\n\n- on(event: string, callback: (...args: any[]) =\u003e any) -- Register event method\n- off(event: string, callback: (...args: any[]) =\u003e any) -- Close event method\n- emit(event: string, ...data: ...any[]) =\u003e number -- Emit event method\n\n### Methods\n\n#### onEvent\n\nType: {event: string, callback: (...args: any[]) =\u003e any} =\u003e void\n\nRegister event to showdowns engine. Currently supporting the following events:\n\n- 'resetImagePath': (id: string, src: string, callback: (imagePath: string) =\u003e void) -- Reset image path event for inline image\n\n#### setFlavor\n\nType: {name: string} =\u003e void\n\nA function to add or update flavor of showdown and showdown.convertor.\n\n#### getMetaData\n\nType: () =\u003e {parsed: object, raw: string, format: string}\n\nGet meta data of doc header.\n\n#### addOptions\n\nType: {options: object} =\u003e void\n\nA function to add or update options of showdown and showdown.convertor.\n\n#### addExtension\n\nType: \\[name, extension] =\u003e void\n\nA function to add or update extension of showdown and showdown.convertor.\n\n#### removeExtension\n\nType: \\[name] =\u003e void\n\nA function to remove extension of showdown and showdown.convertor.\n\n#### addAyncExtension\n\nType: \\[name, extension] =\u003e void\n\nA function to add or update aync extension of showdowns.\n\n#### removeAyncExtension\n\nType: \\[name] =\u003e void\n\nA function to remove aync extension of showdowns.\n\n#### setCDN\n\nType: (cdnname: string, defSheme: string, distScheme: string) =\u003e void\n\nA function to set cdn source when dynamically load js lib files related to more showdown diagrams extension.\n\n- Parameter `cdnname` can be selected 'local' or 'cdnjs' or 'jsdelivr' source.\n- Parameter `defSheme` is default prefix scheme string of source url.\n- Parameter `distScheme` is dist prefix scheme string of source url that has prefix string is '../dist/'.\n\n#### setShowdownFlavor\n\nType: (name: string) =\u003e void\n\nA function to set default flavor of showdown. When showdown.convertor instance be created, it can update flavor of the showdown and convertor.convertor.\n\nSee [showdown options of defaultOptions](#defaultoptions).\n\n- flavor field value: ['github', 'ghost', 'vanilla', 'original', 'allon'], default set to 'github' flavor.\n\n#### setShowdownOptions\n\nType: (options: object) =\u003e object\n\nA function to set default options of showdown. When showdown.convertor instance be created, it can update options of the showdown and convertor.convertor.\n\nSee [showdown options of defaultOptions](https://shiki.style/themes).\n\n#### setLanuageTheme\n\nType: (theme: string) =\u003e object\n\nA function to set default theme of [ShiKi](https://github.com/shikijs/shiki). When showdown.convertor instance be created, it can update options of the showdown and convertor.convertor.\n\nSee [ShiKi Style](https://shiki.style/themes).\n\n#### setExtensionlOptions\n\nType: (name: string, options: object) =\u003e boolean\n\nA function to set default options of extension. It can reset new options of extension.\n\n- Parameter `name` is suffix name of extension name, such as `showdown-[name]`.\n\nSee [options of extension](#defaultoptions).\n\n#### setPlantumlOptions\n\nType: (options: object) =\u003e object\n\nA function to set default options of plantuml extension. When showdown.convertor instance be created, it can reset plantuml extension using the new default options.\n\nSee [plantuml options of defaultOptions](#defaultoptions).\n\n- imageFormat field value: \"svg\" | \"png\" | \"jpg\", default 'png'.\n\n#### setMermaidOptions\n\nType: (options: object) =\u003e object\n\nA function to set default options of mermaid extension. When showdown.convertor instance be created, it can reset mermaid extension using the new default options.\n\nSee [mermaid options of defaultOptions](#defaultoptions).\n\n- mermaid theme field value be selected in ['default', 'forest', 'dark', 'neutral']; When it be set empty, default set to 'default' theme.\n\n#### setKatexOptions\n\nType: (options: object) =\u003e object\n\nA function to set default options of katex extension. When showdown.convertor instance be created, it can reset katex extension using the new default options.\n\nSee [katex options of defaultOptions](#defaultoptions).\n\n#### setKrokiOptions\n\nType: (options: object) =\u003e object\n\nA function to set default options of kroki extension. When showdown.convertor instance be created, it can reset kroki extension using the new default options.\n\nSee [Kroki options of defaultOptions](#defaultoptions).\n\n#### setVegaOptions\n\nType: (options: object) =\u003e object\n\nA function to set default options of vega extension. When showdown.convertor instance be created, it can reset vega extension using the new default options.\n\nSee [vega-embed options of defaultOptions](#defaultoptions).\n\n- vega theme field value be selected in ['excel', 'ggplot2', 'quartz', 'vox', 'dark']; When it be set empty, default set to 'vox' theme.\n\n#### init\n\nType: (reset?: boolean | {option: boolean, extension: boolean}) =\u003e showdonws\n\nA function to init that be created showdown.convertor instance or update default showdown options of the showdown.convertor and reset the extensions using default extension options(as mermaid options, vega options, plantul options) for showdowns.\n\n- Parameter `reset`: After showdown.convertor instance be created; If `option` of reset object is ture, you update default showdown options; If `extension` of reset object is ture, reset the extensions using default extension options(as mermaid options, vega options, plantul options); If `reset` is true, same as value is `{option: true, extension: true}`.\n\n#### makeHtml\n\nType: interface script {\n    outer?:[{\n      name:string,\n      src:string,\n      module?:boolean|'import'|'link'\n    }],\n    id?:string,\n    code?:string,\n    module?:boolean,\n    host?:string | HTMLElement\n    inner?:[{\n      id:string,\n      code:string,\n      module?:boolean,\n      host?:string | HTMLElement\n    }]\n}\n\nType: interface csslink {\n  id: string,\n  link: string\n}\n\nType: ({type:'zip', content: string, output: 'dom'} | string) =\u003e Promise\\\u003c{html: string | HTMLElement[], scripts: script[], cssLinks: csslink[]}\u003e\n\nA async function to make markdown to html that showdown.convertor converte it in current showdowns instance.\n\n#### completedHtml\n\nType: ( scripts?: script[] | string, scriptContainer?: HTMLElement | string) =\u003e Promise\\\u003cboolean\u003e\n\nA async function to completed markdown to html that append scripts to dom.\n\n#### zDecode\n\nType: (data: string) =\u003e string\n\nA function to decode data that be encoded using [zEncode](#zencode).\n\n#### zEncode\n\nType: (content: string) =\u003e string\n\nA function to encode content with zlib.\n\n## License\n\n[MIT](https://github.com/jhuix/showdowns/blob/master/LICENSE)\n\nCopyright (c) 2019-present, [Jhuix](mailto:jhuix0117@gmail.com) (Hui Jin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuix%2Fshowdowns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhuix%2Fshowdowns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuix%2Fshowdowns/lists"}