@lowlighter/markdown 1.2.3 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -33
- package/mod.d.ts +34 -0
- package/mod.js +22 -0
- package/package.json +117 -40
- package/plugins/anchors.d.ts +11 -0
- package/plugins/anchors.js +39 -0
- package/plugins/callouts.d.ts +14 -0
- package/plugins/callouts.js +31 -0
- package/plugins/directives.d.ts +24 -0
- package/plugins/directives.js +76 -0
- package/plugins/emojis.d.ts +11 -0
- package/plugins/emojis.js +15 -0
- package/plugins/frontmatter.d.ts +20 -0
- package/plugins/frontmatter.js +49 -0
- package/plugins/gfm.d.ts +18 -0
- package/plugins/gfm.js +43 -0
- package/plugins/{highlighting.ts → highlighting.d.ts} +2 -11
- package/plugins/highlighting.js +24 -0
- package/plugins/markers.d.ts +15 -0
- package/plugins/markers.js +30 -0
- package/plugins/math.d.ts +21 -0
- package/plugins/math.js +75 -0
- package/plugins/mermaid.d.ts +25 -0
- package/plugins/mermaid.js +32 -0
- package/plugins/mod.d.ts +15 -0
- package/plugins/mod.js +14 -0
- package/plugins/{ruby.ts → ruby.d.ts} +2 -11
- package/plugins/ruby.js +28 -0
- package/plugins/uncomments.d.ts +13 -0
- package/plugins/uncomments.js +28 -0
- package/plugins/wikilinks.d.ts +26 -0
- package/plugins/wikilinks.js +45 -0
- package/presets/default.d.ts +3 -0
- package/presets/default.js +9 -0
- package/presets/svg.d.ts +3 -0
- package/presets/svg.js +11 -0
- package/presets/text.d.ts +3 -0
- package/presets/text.js +11 -0
- package/presets/web.d.ts +3 -0
- package/presets/web.js +12 -0
- package/renderer.d.ts +62 -0
- package/renderer.js +70 -0
- package/types.d.ts +85 -0
- package/types.js +10 -0
- package/deno.jsonc +0 -124
- package/deno.lock +0 -2393
- package/mod.mjs +0 -1
- package/mod.ts +0 -2
- package/mod_test.ts +0 -1
- package/plugins/anchors.mjs +0 -1
- package/plugins/anchors.ts +0 -21
- package/plugins/anchors_test.ts +0 -8
- package/plugins/directives.mjs +0 -1
- package/plugins/directives.ts +0 -112
- package/plugins/directives_test.ts +0 -13
- package/plugins/emojis.mjs +0 -1
- package/plugins/emojis.ts +0 -20
- package/plugins/emojis_test.ts +0 -8
- package/plugins/frontmatter.mjs +0 -1
- package/plugins/frontmatter.ts +0 -43
- package/plugins/frontmatter_test.ts +0 -18
- package/plugins/gfm.mjs +0 -1
- package/plugins/gfm.ts +0 -14
- package/plugins/gfm_test.ts +0 -28
- package/plugins/highlighting.mjs +0 -1
- package/plugins/highlighting_test.ts +0 -8
- package/plugins/linebreaks.mjs +0 -1
- package/plugins/linebreaks.ts +0 -21
- package/plugins/linebreaks_test.ts +0 -8
- package/plugins/markers.mjs +0 -1
- package/plugins/markers.ts +0 -25
- package/plugins/markers_test.ts +0 -13
- package/plugins/math.mjs +0 -1
- package/plugins/math.ts +0 -25
- package/plugins/math_test.ts +0 -8
- package/plugins/mermaid.mjs +0 -1
- package/plugins/mermaid.ts +0 -41
- package/plugins/mermaid_test.ts +0 -8
- package/plugins/mod.mjs +0 -1
- package/plugins/mod.ts +0 -14
- package/plugins/ruby.mjs +0 -1
- package/plugins/ruby_test.ts +0 -8
- package/plugins/sanitize.mjs +0 -1
- package/plugins/sanitize.ts +0 -26
- package/plugins/sanitize_test.ts +0 -15
- package/plugins/uncomments.mjs +0 -1
- package/plugins/uncomments.ts +0 -20
- package/plugins/uncomments_test.ts +0 -8
- package/plugins/wikilinks.mjs +0 -1
- package/plugins/wikilinks.ts +0 -40
- package/plugins/wikilinks_test.ts +0 -14
- package/renderer.mjs +0 -1
- package/renderer.ts +0 -138
- package/renderer_test.ts +0 -19
package/plugins/math.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Imports
|
|
2
|
-
import type { Plugin } from "../renderer.ts"
|
|
3
|
-
import remarkMath from "remark-math"
|
|
4
|
-
import rehypeMathjax from "rehype-mathjax"
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Add support for math.
|
|
8
|
-
*
|
|
9
|
-
* {@link https://www.mathjax.org | See MathJax documentation for more information}.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```md
|
|
13
|
-
* $$
|
|
14
|
-
* \frac{1}{2}
|
|
15
|
-
* $$
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export default {
|
|
19
|
-
remark(processor) {
|
|
20
|
-
return processor.use(remarkMath)
|
|
21
|
-
},
|
|
22
|
-
rehype(processor) {
|
|
23
|
-
return processor.use(rehypeMathjax)
|
|
24
|
-
},
|
|
25
|
-
} as Plugin
|
package/plugins/math_test.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { expect, test } from "@libs/testing"
|
|
2
|
-
import { Renderer } from "../renderer.ts"
|
|
3
|
-
import plugin from "./math.ts"
|
|
4
|
-
|
|
5
|
-
test("deno")("Plugin.math renders math expressions", async () => {
|
|
6
|
-
const markdown = new Renderer({ plugins: [plugin] })
|
|
7
|
-
await expect(markdown.render("$$\\pi$$")).resolves.toMatch(/mjx-container class="MathJax"/)
|
|
8
|
-
})
|