{"id":17260966,"url":"https://github.com/jeffwcx/extendown","last_synced_at":"2025-04-14T06:43:20.338Z","repository":{"id":92002130,"uuid":"94118535","full_name":"jeffwcx/extendown","owner":"jeffwcx","description":"A extendable, lightweight, github compatible markdown compiler!","archived":false,"fork":false,"pushed_at":"2017-06-13T17:43:05.000Z","size":11329,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T02:06:00.264Z","etag":null,"topics":["javascript","markdown","parser"],"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/jeffwcx.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}},"created_at":"2017-06-12T16:41:24.000Z","updated_at":"2023-02-10T20:32:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd0f21d5-016c-46bd-abec-078bd811c554","html_url":"https://github.com/jeffwcx/extendown","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"14929ad863d33c38949eff84a596d3f50ff08f3e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffwcx%2Fextendown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffwcx%2Fextendown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffwcx%2Fextendown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffwcx%2Fextendown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffwcx","download_url":"https://codeload.github.com/jeffwcx/extendown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837264,"owners_count":21169373,"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":["javascript","markdown","parser"],"created_at":"2024-10-15T07:49:42.402Z","updated_at":"2025-04-14T06:43:20.312Z","avatar_url":"https://github.com/jeffwcx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp\u003e\u003cimg width=\"160\" height=\"150\" src=\"https://github.com/jeffwcx/extendown/raw/master/logo.png\"\u003e\u003c/p\u003e\n\n[![TravisCi Build](https://img.shields.io/travis/jeffwcx/extendown.svg)](https://travis-ci.org/jeffwcx/extendown)\n[![Coverage Status](https://img.shields.io/coveralls/jeffwcx/extendown/master.svg)](https://coveralls.io/github/jeffwcx/extendown?branch=master)\n[![MIT](https://img.shields.io/npm/l/extendown.svg)](https://github.com/jeffwcx/extendown/blob/master/LICENSE)\n[![Version](https://img.shields.io/npm/v/extendown.svg)](https://www.npmjs.com/package/extendown)\n## extendable markdown compiler\n\n## Features\n\n+ Extenable\n+ Github Mardown Syntax \n\n## Usage\n### 1. install it by npm\n```\nnpm install extendown\n```\n### 2. use it in nodejs or browser\nThe libray is packaged in UMD, you can import it in ES6 modules, CommonJS, AMD, etc.\n\n### 3. how to use\n\n```javascript\nimport Extendown from 'extendown';\n\nconst parse = Extendown.parse;\nparse(YourMarkdownString);\n```\n\n### 4. how to extend\nthe following code is extend a inline feature\n```javascript\nconst parse = Extendown.parse;\nconst extend = Extendown.extend;\nconst feature = {\n  reg: '==(.+?)==',\n  process(section) {\n    return section.replace(new RegExp(feature.reg, 'g'),\n    '\u003cspan style=\"background-color:yellow;\"\u003e$1\u003c/span\u003e');\n  },\n}\nextend(Extdown.INLINE, feature);\nparse('==color=='); \n// \u003cp\u003e\u003cspan style=\"background-color:yellow;\"\u003ecolor\u003c/span\u003e\u003c/p\u003e\n```\nthe following code is extend a block feature\n```javascript\nconst feature = {\n  reg: '(?:^|\\\\n)@@\\\\n((?:[^@]*\\\\n)?)@@(?=\\\\n|$)',\n  process(section) {\n    return section.replace(new RegExp(feature.reg, 'g'), (match, g1) =\u003e {\n      return `\u003carticle\u003e${g1}\u003c/article\u003e`\n    });\n  },\n};\nextend(Extdown.BLOCK, feature);\nparse(`@@\n\u003cp\u003ehere is your article\u003c/p\u003e\n@@`);\n// \u003carticle\u003e\u003cp\u003ehere is your article\u003c/p\u003e\\n\u003c/article\u003e\n```\n\n### 5. how to config\nThe most config is for emoji, we will provide more config in future.\n\nYou can change emoji image's url in following ways.\n1. change base path\n```javascript\nconfig.emoji.path = 'https://dn-phphub.qbox.me/assets/images/emoji/';\n```\n2. change extension\n```javascript\nconfig.emoji.ext = 'gif';\n```\n3. change your format function\n\n```javascript\nconfig.emoji.nameFormat = function(name) {\n  return `${name}test`;\n};\n```\n\n## Basic Syntax\n\nRefer to Github Markdown\n\n## refenrence\n+ [Markdown: Syntax](http://daringfireball.net/projects/markdown/syntax)\n\n+ [Basic writing and formatting syntax](https://help.github.com/articles/basic-writing-and-formatting-syntax)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffwcx%2Fextendown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffwcx%2Fextendown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffwcx%2Fextendown/lists"}