File tree Expand file tree Collapse file tree 1 file changed +25
-13
lines changed
Expand file tree Collapse file tree 1 file changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -62,26 +62,38 @@ import (
6262)
6363
6464func main () {
65- inlineDelimiters := []passthrough.Delimiters {
66- {Open: " \\ (" , Close: " \\ )" },
67- }
68- blockDelimiters := []passthrough.Delimiters {
69- {Open: " \\ [" , Close: " \\ ]" },
70- {Open: " $$" , Close: " $$" },
71- }
72-
7365 md := goldmark.New (
7466 goldmark.WithExtensions (
75- passthrough.NewPassthroughWithDelimiters (
76- inlineDelimiters,
77- blockDelimiters,
67+ passthrough.New (
68+ passthrough.Config {
69+ InlineDelimiters: []passthrough.Delimiters {
70+ {
71+ Open: " $" ,
72+ Close: " $" ,
73+ },
74+ {
75+ Open: " \\ (" ,
76+ Close: " \\ )" ,
77+ },
78+ },
79+ BlockDelimiters: []passthrough.Delimiters {
80+ {
81+ Open: " $$" ,
82+ Close: " $$" ,
83+ },
84+ {
85+ Open: " \\ [" ,
86+ Close: " \\ ]" ,
87+ },
88+ },
89+ },
7890 )),
7991 )
8092
8193 input := `
82- block \[ a^*=x-b^*\] snippet
94+ block $$ a^*=x-b^*$$ snippet
8395
84- inline \( a^*=x-b^*\) snippet
96+ inline $ a^*=x-b^*$ snippet
8597`
8698
8799 var buf bytes.Buffer
You can’t perform that action at this time.
0 commit comments