File tree 4 files changed +29
-22
lines changed
4 files changed +29
-22
lines changed Original file line number Diff line number Diff line change 10
10
"marked-footnote" : " npm:marked-footnote@^1.2" ,
11
11
"marked-gfm-heading-id" : " npm:marked-gfm-heading-id@^3.1" ,
12
12
"prismjs" : " npm:prismjs@^1.29" ,
13
+ "prismjs-yaml" : " npm:prismjs@^1.29/components/prism-yaml.js" ,
13
14
"sanitize-html" : " npm:sanitize-html@^2.11" ,
14
15
"he" : " npm:he@^1.2" ,
15
16
"katex" : " npm:katex@^0.16" ,
29
30
"test" : " deno test --allow-read --allow-env --allow-write --allow-run --allow-net"
30
31
},
31
32
"fmt" : {
32
- "exclude" : [" ./test/fixtures/alerts.md" , " ./test/fixtures/lineBreaks.md" ]
33
+ "exclude" : [
34
+ " ./test/fixtures/alerts.md" ,
35
+ " ./test/fixtures/lineBreaks.md" ,
36
+ " ./test/fixtures/footnote.md" ,
37
+ " ./example/content.md"
38
+ ]
33
39
}
34
40
}
Original file line number Diff line number Diff line change @@ -70,12 +70,12 @@ G_{\mu v} = \frac{8 \pi G}{c^4} T_{\mu v}
70
70
71
71
We also support math blocks and inline math blocks as well!
72
72
73
- When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$and they are
73
+ When $a \ne 0$, there are two solutions to $(ax^2 + bx + c = 0)$ and they are
74
74
75
75
$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
76
76
77
- You can even typeset individual letters or whole sentences inline just like
78
- $x$ or $Quadratic \; formula$. You can also use math blocks to typeset whole
77
+ You can even typeset individual letters or whole sentences inline just like $x$
78
+ or $Quadratic \; formula$. You can also use math blocks to typeset whole
79
79
equations with $\LaTeX$:
80
80
81
81
$$ \begin{aligned} \dot{x} & = \sigma(y-x) \\ \dot{y} & = \rho x - y - xz \\
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import markedFootnote from "marked-footnote";
8
8
import { gfmHeadingId } from "marked-gfm-heading-id" ;
9
9
import Prism from "prismjs" ;
10
10
import sanitizeHtml from "sanitize-html" ;
11
+ import "prismjs-yaml" ;
11
12
12
- import "https://esm.sh/[email protected] /components/prism-yaml" ;
13
13
import { CSS , KATEX_CLASSES , KATEX_CSS } from "./style.ts" ;
14
14
export { CSS , KATEX_CSS , Marked } ;
15
15
@@ -54,12 +54,12 @@ export class Renderer extends Marked.Renderer {
54
54
if ( isTitleIncluded ) {
55
55
language = language ! . split ( " " ) [ 0 ] ;
56
56
title = isTitleIncluded [ 1 ] ;
57
- } else {
58
- // a language of `ts, ignore` should really be `ts`
59
- // and it should be lowercase to ensure it has parity with regular github markdown
60
- language = language ?. split ( "," ) ?. [ 0 ] . toLocaleLowerCase ( ) ;
61
57
}
62
58
59
+ // a language of `ts, ignore` should really be `ts`
60
+ // and it should be lowercase to ensure it has parity with regular github markdown
61
+ language = language ?. split ( "," ) ?. [ 0 ] . toLocaleLowerCase ( ) ;
62
+
63
63
// transform math code blocks into HTML+MathML
64
64
// https://github.blog/changelog/2022-06-28-fenced-block-syntax-for-mathematical-expressions/
65
65
if ( language === "math" && this . allowMath ) {
Original file line number Diff line number Diff line change @@ -22,23 +22,24 @@ blocks[^bignote].
22
22
23
23
[ ^ bignote ] : The first paragraph of the definition.
24
24
25
- Paragraph two of the definition.
25
+ Paragraph two of the definition.
26
26
27
- > A blockquote with multiple lines.
27
+ > A blockquote with
28
+ > multiple lines.
28
29
29
- ```
30
- a code block
31
- ```
30
+ ~~~
31
+ a code block
32
+ ~~~
32
33
33
- | Header 1 | Header 2 |
34
- | -------- | -------- |
35
- | Cell 1 | Cell 2 |
34
+ | Header 1 | Header 2 |
35
+ | -------- | -------- |
36
+ | Cell 1 | Cell 2 |
36
37
37
- A \` final\` paragraph before list.
38
+ A \`final\` paragraph before list.
38
39
39
- - Item 1
40
- - Item 2
41
- - Subitem 1
42
- - Subitem 2
40
+ - Item 1
41
+ - Item 2
42
+ - Subitem 1
43
+ - Subitem 2
43
44
44
45
[^@#$%]: A footnote on the label: "@#$%".
You can’t perform that action at this time.
0 commit comments