diff --git a/markdown/markdown.scrbl b/markdown/markdown.scrbl index 3a97589..16992b3 100644 --- a/markdown/markdown.scrbl +++ b/markdown/markdown.scrbl @@ -201,8 +201,7 @@ Markdown Extra} and @item{Support for math-jax expressions --- inline within @litchar{\\(} and @litchar{\\)} delimiters and display within @litchar{\\[} and -@litchar{\\]} delimiters --- resulting in @tt{script} elements with -@tt{type=math/tex}.} +@litchar{\\]} delimiters --- resulting in eqivalent markup in the output.} ]} diff --git a/markdown/parse.rkt b/markdown/parse.rkt index b0f5628..6e98011 100644 --- a/markdown/parse.rkt +++ b/markdown/parse.rkt @@ -637,14 +637,12 @@ (define $math-jax-inline (try (pdo (string "\\\\(") (xs <- (many1Till $anyChar (try (string "\\\\)")))) - (return `(script ([type "math/tex"]) - ,(list->string xs)))))) + (return (string-append "\\(" (list->string xs) "\\)"))))) (define $math-jax-display (try (pdo (string "\\\\[") (xs <- (many1Till $anyChar (try (string "\\\\]")))) - (return `(script ([type "math/tex; mode=display"]) - ,(list->string xs)))))) + (return (string-append "\\[" (list->string xs) "\\]"))))) (define $math-jax ( $math-jax-inline diff --git a/markdown/test.rkt b/markdown/test.rkt index c1ae407..1f628a8 100644 --- a/markdown/test.rkt +++ b/markdown/test.rkt @@ -930,11 +930,9 @@ (!HTML-COMMENT () " more"))))) ;; https://github.com/greghendershott/markdown/issues/52 (check-md "\\\\(ax^2 + bx + c = 0\\\\)" - '((p () (script ((type "math/tex")) - "ax^2 + bx + c = 0")))) + '((p () "\\(ax^2 + bx + c = 0\\)"))) (check-md "\\\\[ax^2 + bx + c = 0\\\\]" - '((p () (script ((type "math/tex; mode=display")) - "ax^2 + bx + c = 0")))) + '((p () "\\[ax^2 + bx + c = 0\\]"))) ;; but single \ still escapes as usual and the contents are still ;; parsed as markdown: (check-md "\\(some *italic* text\\)"