internal/warpc: Enable KaTeX mhchem extension

This commit is contained in:
Joe Mooring
2025-02-13 13:56:11 -08:00
committed by Bjørn Erik Pedersen
parent 5dd0ba00f7
commit 503dcf6252
6 changed files with 24 additions and 16 deletions

View File

@@ -77,6 +77,13 @@ func TestKatex(t *testing.T) {
c.Assert(result.GetID(), qt.Equals, id)
})
c.Run("Chemistry", func(c *qt.C) {
id := uint32(32)
result, err := runExpression(c, id, "C_p[\\ce{H2O(l)}] = \\pu{75.3 J // mol K}")
c.Assert(err, qt.IsNil)
c.Assert(result.GetID(), qt.Equals, id)
})
c.Run("Invalid expression", func(c *qt.C) {
id := uint32(32)
result, err := runExpression(c, id, "c & \\foo\\")