GitShow/antfu/markdown-it-async
antfu

markdown-it-async

Enhance markdown-it to support async highlight function.

by antfu
highlightmarkdown-it
Star on GitHubForknpm

TypeScript

131 stars6 forks3 contributorsQuiet · 1y agoSince 2024v2.2.0MIT

Meet the team

See all 3 on GitHub →
antfu
antfu38 contributions
s-light
s-light1 contribution
ShenQingchuan
ShenQingchuan1 contribution

Languages

View on GitHub →
TypeScript98.8%
JavaScript1.2%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Quiet · 1 in progress · Last activity 1y ago
See all on GitHub →
FrontEndDog
Supports instantiation via new keywordOpenIssue

Clear and concise description of the problem Suggested solution Supports instantiation via new keyword Alternative _No response_ Additional context _No response_ Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

FrontEndDog · 2w ago
ronny1020
Since the render is async, can it also support async rules?OpenIssue

Clear and concise description of the problem Thanks for this excellent tool! I'm currently using it with VitePress 2.0.0-alpha and trying to create my own markdown-it plugin that requires an async render rule. However, it seems that md.renderer.rules does not support async functions. Would it be possible to allow md.renderer.rules to be async to support this use case? Thanks in advance! Suggested solution We can extend the Renderer class and create the async render method in this repo. Alternative _No response_ Additional context the sample code is adjusted from this https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

ronny1020 · 2w ago
ronny1020
feat(rules): support async markdown-it rulesOpenPR

Description support async markdown-it rules, and add test and doc Linked Issues relate to #5 Additional context

ronny1020 · 1y ago

Recent fixes

View closed PRs →
s-light
feat: add rendererRenderAsyncMergedPR

Description allow for renderer.render access in the async way. Linked Issues fixes #3 Additional context i have no experience in ts - so please review my code carefully!! (i tried my best)

s-light · 1y ago
s-light
allow custom async *magic* between parse & renderClosedIssue

Clear and concise description of the problem kind of allow async plugins this is supported if you do the parsing and rendering yourself. more information can be found in this topic: https://github.com/markdown-it/markdown-it/issues/256#issuecomment-2434345725 Suggested solution this would be easily possible if we split the parse and render functions / make the renderer.render someway available: something in the like of Alternative _No response_ Additional context this is needed for https://github.com/unplugin/unplugin-vue-markdown/issues/62 i will create a pr for this.. Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

s-light · 1y ago
harpreetkhalsagtbit
Error: isSpace is not definedClosedIssue

Describe the bug Refer the code below ts\nconsole.log("Hello, World!")\n I am getting this err when my markdown string includes - Numbered list !Image for instance Reproduction use markdown string with numbered list System Info Used Package Manager npm Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. [x] The provided reproduction is a minimal reproducible of the bug. Contributions [ ] I am willing to submit a PR to fix this issue [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

harpreetkhalsagtbit · 1y ago
Structured data for AI agents

Repository: antfu/markdown-it-async. Description: Enhance markdown-it to support async highlight function. Stars: 131, Forks: 6. Primary language: TypeScript. Languages: TypeScript (98.8%), JavaScript (1.2%). License: MIT. Topics: highlight, markdown-it. Latest release: v2.2.0 (1y ago). Open PRs: 1, open issues: 2. Last activity: 1y ago. Community health: 85%. Top contributors: antfu, s-light, ShenQingchuan.

·@ofershap

Replace github.com with gitshow.dev