{"id":22485349,"url":"https://github.com/siaikin/mdReverse","last_synced_at":"2025-08-02T18:32:13.069Z","repository":{"id":57293379,"uuid":"188661224","full_name":"siaikin/mdReverse","owner":"siaikin","description":"written by JavaScript. Convert HTML to Markdown.（将HTML转换为Markdown）","archived":false,"fork":false,"pushed_at":"2020-01-20T16:41:49.000Z","size":325,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-30T19:19:09.028Z","etag":null,"topics":["html","html-to-markdown","htmltomarkdown","javascript"],"latest_commit_sha":null,"homepage":"https://siaikin.github.io/mdReverse/","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/siaikin.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":"2019-05-26T09:02:39.000Z","updated_at":"2022-03-17T10:15:50.000Z","dependencies_parsed_at":"2022-09-01T08:40:37.063Z","dependency_job_id":null,"html_url":"https://github.com/siaikin/mdReverse","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2FmdReverse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2FmdReverse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2FmdReverse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siaikin%2FmdReverse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siaikin","download_url":"https://codeload.github.com/siaikin/mdReverse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228499950,"owners_count":17929988,"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":["html","html-to-markdown","htmltomarkdown","javascript"],"created_at":"2024-12-06T17:12:26.686Z","updated_at":"2024-12-06T17:14:18.855Z","avatar_url":"https://github.com/siaikin.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# mdReverse\n将HTML文本转换为Markdown格式文本。由JavaScript编写\n\n[Demo](https://siaikin.github.io/mdReverse/)\n\n* [开发进度](docs/development.md)\n* [English Version](./docs/README_EN.md)\n## 安装\nnpm:\n```\nnpm install md-reverse\n```\nscript引入:\n```html\n\u003cscript src=\"../dist/md-reverse.browser.js\" type=\"application/javascript\"\u003e\u003c/script\u003e\n```\n前往[Github](https://github.com/siaikin/mdReverse/releases/tag/v1.0.0)下载\n\n## 用法\n\n*   [插件开发说明](./docs/pluginDevelopment.md)\n\n###### ES6 Modules\n```javascript\nimport {MdReverse, TablePlugin, StrikethroughPlugin} from \"md-reverse\";\n\nconst mdReverse = new MdReverse();\nmdReverse.toMarkdown(`\u003ch1\u003eHello World!\u003c/h1\u003e`);\n\n// 使用插件扩展Table, Strikethrough语法\nmdReverse.use(TablePlugin);\nmdReverse.use(StrikethroughPlugin);\nmdReverse.toMarkdown(`\u003ch1\u003e\u003cdelHello World!\u003c/del\u003e\u003c/h1\u003e`);\n```\n###### 原生js\n```html\n\u003cscript src=\"dist/md-reverse.browser.min.js\"\u003e\u003c/script\u003e\n```\n```javascript\nconst mdReverse = new MdReverse();\nmdReverse.toMarkdown(`\u003ch1\u003eHello World!\u003c/h1\u003e`);\n\n// 使用插件扩展Table, Strikethrough语法\nmdReverse.use(MdReverse.plugin['table']);\nmdReverse.use(MdReverse.plugin['strikethrough']);\nmdReverse.toMarkdown(`\u003ch1\u003e\u003cdelHello World!\u003c/del\u003e\u003c/h1\u003e`);\n```\n\n## 支持语法\n1. [Markdown基本语法](https://www.markdownguide.org/basic-syntax/)\n2. [Table语法](https://www.markdownguide.org/extended-syntax/#tables)\n3. [strikethrough语法](https://www.markdownguide.org/extended-syntax/#strikethrough)\n\n## 提示\n*   因为各个网站的网页结构千奇百怪，做不到匹配所有网站，建议转换的HTML文本本身就是由Markdown编写的或符合Markdown规范。\n    在转换非Markdown规范的HTML文本可能准确性会大大下降。\n*   目前仅能支持Markdown的[基本语法](https://www.markdownguide.org/basic-syntax)。[扩展语法](https://www.markdownguide.org/extended-syntax)部分会在之后陆续完成。\n*   为了提高转换的准确性，对于无法识别的HTML标签，`md-reverse`会将其删除。这个问题在扩展语法部分完成后会尝试解决。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiaikin%2FmdReverse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiaikin%2FmdReverse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiaikin%2FmdReverse/lists"}