-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MathML support #303
Comments
Looking at the |
I don't know those details off the top of my head. Write a test and see what happens. You can start with https://tools.arslexis.io/goplayground/#txO7hJ-ibeU Looking at this issue, I don't know what I need to see the markdown, the expected html output and what we output. And also a link to https://babelmark.github.io/ with the same markdown. Then we can discuss if this is the right behavior and how to fix if it's not the right behavior. |
I added the following test to my // Inside MATH, so the other elements are passed through.
func TestMath(t *testing.T) {
input := `# Some expression
<math><mtext>2 * x</mtext></math>
`
p := NewWithExtensions(CommonExtensions)
doc := p.Parse([]byte(input))
var buf bytes.Buffer
ast.Print(&buf, doc)
got := buf.String()
exp := "Heading\n Text 'Some expression'\nHTMLBlock '<math><mtext>2 * x</mtext></math>'\n"
if got != exp {
t.Errorf("\nInput [%#v]\nExpected[%#v]\nGot [%#v]\n",
input, exp, got)
}
} (This test, like the others, could be written data driven – right now it follows the examples in Perhaps the key is that people want to remove the extensions := (parser.CommonExtensions | parser.AutoHeadingIDs | parser.Attributes) & ^parser.MathJax
parser := parser.NewWithExtensions(extensions) This assumes that I understand @severny-polus's issue correctly. |
I might be wrong but I suppose what he means is: generate |
Oof, a LaTeX to MathML converter? That's going to be super tough, I think. |
It would be helpful if you add MathML support instead of MathJax. It is supported by almost all modern browsers and does not require JavaScript at all.
The text was updated successfully, but these errors were encountered: