From 61e34d197f41a65cb6ea72b893cf2473312bc4ba Mon Sep 17 00:00:00 2001 From: Zack Date: Sun, 7 Feb 2016 14:00:54 -0500 Subject: [PATCH] Updated about Former-commit-id: c9c59849c05a66daa7a64e7f2c4784b650f522a9 [formerly 9864e75fb5100de2ac070bd5e2a99ad7dc24d071] [formerly 96b442cb3a16496d048fac705d5e9736c6ff71f4 [formerly 94c0541cd0bc9eb51151670da33304f79f2b37fa]] Former-commit-id: 986710bd9ca457a4039aa0d06e8d1670e8b13976 [formerly 44e9a84723d87d61ee87b759d57ba4cb1a24d1c2] Former-commit-id: 26b34368bae4930875340c9226d28083161696eb --- routes.go | 1 + utils.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/routes.go b/routes.go index 9f1d4b5..51f682d 100644 --- a/routes.go +++ b/routes.go @@ -74,6 +74,7 @@ func renderMarkdown(c *gin.Context, title string) { html2 = strings.Replace(html2, s, "", 1) } + html2 = strings.Replace(html2, "$", "$", -1) c.HTML(http.StatusOK, "view.tmpl", gin.H{ "Title": title, "Body": template.HTML([]byte(html2)), diff --git a/utils.go b/utils.go index 99cdbce..df4bd5f 100644 --- a/utils.go +++ b/utils.go @@ -23,7 +23,7 @@ You can also write your notes in [Markdown](https://daringfireball.net/projects/ If you are writing a list and you want to tick off things really easily, just add ` + "`" + `/list` + "`" + `. For example, after editing [` + "`" + `/grocery` + "`" + `](/grocery), goto [` + "`" + `/grocery/list` + "`" + `](/grocery/list). In this page, whatever you click on will be striked through and moved to the end. This is helpful if you write a grocery list and then want to easily delete things from it. -Math is supported using [Katex](https://github.com/Khan/KaTeX). Simple +Math is supported using [Katex](https://github.com/Khan/KaTeX). For example, ` + "`" + `$\frac{1}{2}$` + "`" + ` becomes $\frac{1}{2}$ and ` + "`" + `$$E=mc^2$$` + "`" + ` becomes $$E=mc^2$$ Be cautious about writing sensitive information in the notes as anyone with the URL has access to it. For more information, or if you'd like to edit the code, [use the github](https://github.com/schollz/cowyo).