From 20777bf3d9a1e073db5bc212729e7024f9465f3a Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Wed, 20 Nov 2024 01:25:12 -0500 Subject: [PATCH] feat: add alert blockquote handling --- .changeset/shaggy-ants-collect.md | 12 ++++++++++ .gitignore | 6 ++++- docs/index.html | 7 ++++-- docs/markdown-to-jsx.js | 2 -- docs/markdown-to-jsx.js.map | 1 - index.compiler.spec.tsx | 15 ++++++++++++ index.tsx | 38 +++++++++++++++++++++++-------- package.json | 4 ++-- site.tsx | 21 ++++++++++++++++- 9 files changed, 87 insertions(+), 19 deletions(-) create mode 100644 .changeset/shaggy-ants-collect.md delete mode 100644 docs/markdown-to-jsx.js delete mode 100644 docs/markdown-to-jsx.js.map diff --git a/.changeset/shaggy-ants-collect.md b/.changeset/shaggy-ants-collect.md new file mode 100644 index 00000000..d64b91b6 --- /dev/null +++ b/.changeset/shaggy-ants-collect.md @@ -0,0 +1,12 @@ +--- +'markdown-to-jsx': minor +--- + +Add support for GFM alert-style blockquotes. + +```md +> [!Note] +> This is a note-flavored alert blockquote. The "Note" text is injected as a `
` by +> default and the blockquote can be styled via the injected class `markdown-alert-note` +> for example. +``` diff --git a/.gitignore b/.gitignore index dba5fe5a..6ae8ef9f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ node_modules/ .git/ .DS_Store coverage/ -dist/ *.log package-lock.json npm-shrinkwrap.json @@ -15,3 +14,8 @@ npm-shrinkwrap.json !.yarn/releases !.yarn/sdks !.yarn/versions + +# ephemeral files +dist/ +docs/markdown-to-jsx.js +docs/markdown-to-jsx.js.map diff --git a/docs/index.html b/docs/index.html index d49ad7a8..d28633b0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ - + markdown-to-jsx: try it live! @@ -45,7 +45,7 @@