openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 9ce397f2456fb400246d046062775c2e76f0a58b
parent ee202db179da23f6fdc00ad7f70911aeca870f5b
Author: Peter Kosyh <p.kosyh@gmail.com>
Date:   Sun, 18 Oct 2020 10:23:44 +0100

Merge branch 'master' of https://github.com/gl00my/ii-go

Diffstat:
Mii-node/lib/style.css | 5+++++
Mii-node/web.go | 7+++++--
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ii-node/lib/style.css b/ii-node/lib/style.css @@ -271,6 +271,11 @@ body { color: #555555; font-style: italic; } + +.header { + font-weight: bold; +} + .spoiler { color: #cccccc; } diff --git a/ii-node/web.go b/ii-node/web.go @@ -790,9 +790,12 @@ func msg_text(m *ii.Msg) string { skip = 0 l = msg_esc(l) } else if strings.HasPrefix(l, "P.S.") || strings.HasPrefix(l, "PS:") || - strings.HasPrefix(l, "//") || strings.HasPrefix(l, "#") || - strings.HasPrefix(l, "+++ ") { + strings.HasPrefix(l, "//") || strings.HasPrefix(l, "+++ ") { l = fmt.Sprintf("<span class=\"comment\">%s</span>", str_esc(l)) + } else if strings.HasPrefix(l, "# ") || strings.HasPrefix(l, "= ") || + strings.HasPrefix(l, "## ") || strings.HasPrefix(l, "== ") || + strings.HasPrefix(l, "### ") || strings.HasPrefix(l, "=== ") { + l = fmt.Sprintf("<span class=\"header\">%s</span>", str_esc(l)) } else if strings.HasPrefix(l, "@spoiler:") { l = fmt.Sprintf("<span class=\"spoiler\">%s</span>", str_esc(ReverseStr(l))) } else if quoteRegex.MatchString(l) {