@lowlighter/markdown 1.2.3 → 2.0.0
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/deno.jsonc +7 -7
- package/deno.lock +2248 -2359
- package/mod.mjs +1 -1
- package/package.json +1 -1
- package/plugins/anchors_test.ts +1 -1
- package/plugins/directives.mjs +1 -1
- package/plugins/directives_test.ts +1 -1
- package/plugins/emojis_test.ts +1 -1
- package/plugins/frontmatter_test.ts +1 -1
- package/plugins/gfm_test.ts +5 -5
- package/plugins/highlighting_test.ts +1 -1
- package/plugins/linebreaks_test.ts +1 -1
- package/plugins/markers_test.ts +2 -2
- package/plugins/math_test.ts +1 -1
- package/plugins/mermaid.mjs +1 -1
- package/plugins/mermaid_test.ts +1 -1
- package/plugins/mod.mjs +1 -1
- package/plugins/ruby_test.ts +1 -1
- package/plugins/sanitize_test.ts +2 -2
- package/plugins/uncomments_test.ts +1 -1
- package/plugins/wikilinks_test.ts +2 -2
- package/renderer.mjs +1 -1
- package/renderer_test.ts +3 -3
package/plugins/ruby_test.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { expect, test } from "@libs/testing"
|
|
|
2
2
|
import { Renderer } from "../renderer.ts"
|
|
3
3
|
import plugin from "./ruby.ts"
|
|
4
4
|
|
|
5
|
-
test("deno")("Plugin.ruby renders ruby content", async () => {
|
|
5
|
+
test("deno")("`Plugin.ruby` renders ruby content", async () => {
|
|
6
6
|
const markdown = new Renderer({ plugins: [plugin] })
|
|
7
7
|
await expect(markdown.render("{foo}^(bar)")).resolves.toMatch(/<ruby>foo<rp>\(<\/rp><rt>bar<\/rt><rp>\)<\/rp><\/ruby>/)
|
|
8
8
|
})
|
package/plugins/sanitize_test.ts
CHANGED
|
@@ -2,12 +2,12 @@ import { expect, test } from "@libs/testing"
|
|
|
2
2
|
import { Renderer } from "../renderer.ts"
|
|
3
3
|
import plugin, { create, schema } from "./sanitize.ts"
|
|
4
4
|
|
|
5
|
-
test("deno")("Plugin.sanitize renders sanitized output", async () => {
|
|
5
|
+
test("deno")("`Plugin.sanitize` renders sanitized output", async () => {
|
|
6
6
|
const markdown = new Renderer({ plugins: [plugin] })
|
|
7
7
|
await expect(markdown.render("foo <script>console.log('hello')</script> bar")).not.resolves.toContain("<script>")
|
|
8
8
|
})
|
|
9
9
|
|
|
10
|
-
test("deno")("Plugin.sanitize exposes a way to create custom sanitization", async () => {
|
|
10
|
+
test("deno")("`Plugin.sanitize` exposes a way to create custom sanitization", async () => {
|
|
11
11
|
const a = new Renderer({ plugins: [create({ ...schema, attributes: { span: [] } })] })
|
|
12
12
|
await expect(a.render("<span foo></span>")).resolves.not.toContain("foo")
|
|
13
13
|
const b = new Renderer({ plugins: [create({ ...schema, attributes: { span: ["foo"] } })] })
|
|
@@ -2,7 +2,7 @@ import { expect, test } from "@libs/testing"
|
|
|
2
2
|
import { Renderer } from "../renderer.ts"
|
|
3
3
|
import plugin from "./uncomments.ts"
|
|
4
4
|
|
|
5
|
-
test("deno")("Plugin.uncomments renders without any comments", async () => {
|
|
5
|
+
test("deno")("`Plugin.uncomments` renders without any comments", async () => {
|
|
6
6
|
const markdown = new Renderer({ plugins: [plugin] })
|
|
7
7
|
await expect(markdown.render("foo<!-- baz -->bar")).resolves.toMatch(/foobar/)
|
|
8
8
|
})
|
|
@@ -2,12 +2,12 @@ import { expect, test } from "@libs/testing"
|
|
|
2
2
|
import { Renderer } from "../renderer.ts"
|
|
3
3
|
import plugin, { create } from "./wikilinks.ts"
|
|
4
4
|
|
|
5
|
-
test("deno")("Plugin.wikilinks renders wiki links format", async () => {
|
|
5
|
+
test("deno")("`Plugin.wikilinks` renders wiki links format", async () => {
|
|
6
6
|
const markdown = new Renderer({ plugins: [plugin] })
|
|
7
7
|
await expect(markdown.render("[[Foo Bar]]")).resolves.toMatch(/<a class=".*wikilink.*" href="\/pages\/foo-bar">Foo Bar<\/a>/)
|
|
8
8
|
})
|
|
9
9
|
|
|
10
|
-
test("deno")("Plugin.wikilinks exposes a way to create custom formatting", async () => {
|
|
10
|
+
test("deno")("`Plugin.wikilinks` exposes a way to create custom formatting", async () => {
|
|
11
11
|
const markdown = new Renderer({ plugins: [create({ existing: ["foo"] })] })
|
|
12
12
|
await expect(markdown.render("[[foo]]")).resolves.toMatch(/<a class="wikilink".*>foo<\/a>/)
|
|
13
13
|
await expect(markdown.render("[[bar]]")).resolves.toMatch(/<a class="wikilink new".*>bar<\/a>/)
|