From 2abe92e4ab3f14693c01a2e12b20679adff3d360 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 14 May 2019 11:11:11 -0400 Subject: [PATCH] better style for blockquote --- fun.go | 2 ++ views/style.css | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/fun.go b/fun.go index e2097dd..c8ee334 100644 --- a/fun.go +++ b/fun.go @@ -151,6 +151,7 @@ var re_bolder = regexp.MustCompile(`(^|\W)\*\*([\w\s,.!?']+)\*\*($|\W)`) var re_italicer = regexp.MustCompile(`(^|\W)\*([\w\s,.!?']+)\*($|\W)`) var re_bigcoder = regexp.MustCompile("```\n?((?s:.*?))\n?```") var re_coder = regexp.MustCompile("`([^`]*)`") +var re_quoter = regexp.MustCompile(`(?m:^> (.*)\n)`) func markitzero(s string) string { var bigcodes []string @@ -167,6 +168,7 @@ func markitzero(s string) string { s = re_coder.ReplaceAllStringFunc(s, lilsaver) s = re_bolder.ReplaceAllString(s, "$1$2$3") s = re_italicer.ReplaceAllString(s, "$1$2$3") + s = re_quoter.ReplaceAllString(s, "
$1
") lilun := func(s string) string { code := lilcodes[0] lilcodes = lilcodes[1:] diff --git a/views/style.css b/views/style.css index 54279df..0fb41ee 100644 --- a/views/style.css +++ b/views/style.css @@ -7,6 +7,11 @@ body { pre, code { white-space: pre-wrap; } +blockquote { + margin-left: 0em; + padding-left: 0.5em; + border-left: 1px solid #aab; +} a { color: #dde; }