From 24c671f0492b963afac7a9310619808727d7d042 Mon Sep 17 00:00:00 2001 From: Kye Shi Date: Mon, 1 Feb 2021 23:54:17 -0800 Subject: [PATCH] improve readme wording --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2852f2d..37e38fb 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ This plugin is functionally equivalent to [rehype-katex][rehype-katex] but is specifically intended to be used with [mdsvex][mdsvex] (markdown format for [Svelte][svelte]). -The key issue it addresses is that curly braces in LaTeX, e.g. `{x}`, conflict +The key issue it addresses is that LaTeX curly braces (e.g. `{x}`) conflict with Svelte's template syntax; as such, using rehype-katex to serialize a LaTeX expression such as `\frac{x}{y}` would result in "`x` is not defined" and "`y` is not defined" errors. This plugin fixes those errors by rendering KaTeX -content via `{@html "..."}` instead of directly as HTML nodes (which is what +content via `{@html "..."}` instead of plain HTML nodes (which is what rehype-katex does), preventing curly-brace content from getting treated as Svelte template expressions.