diff --git a/docs/changelog.txt b/docs/changelog.txt index f894e6f..952980f 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,8 @@ changelog -- next ++ Add cite tag for block quote attributions. + + @media print styles. + Disable overscroll (pull down) refresh. diff --git a/markitzero.go b/markitzero.go index 1e41f7a..2115d32 100644 --- a/markitzero.go +++ b/markitzero.go @@ -28,7 +28,7 @@ var re_bolder = regexp.MustCompile(`(^|\W)\*\*((?s:.*?))\*\*($|\W)`) var re_italicer = regexp.MustCompile(`(^|\W)\*((?s:.*?))\*($|\W)`) var re_bigcoder = regexp.MustCompile("```(.*)\n?((?s:.*?))\n?```\n?") var re_coder = regexp.MustCompile("`([^`]*)`") -var re_quoter = regexp.MustCompile(`(?m:^> (.*)\n?)`) +var re_quoter = regexp.MustCompile(`(?m:^> (.*)(\n-(.*))?\n?)`) var re_link = regexp.MustCompile(`.?.?https?://[^\s"]+[\w/)!]`) var re_zerolink = regexp.MustCompile(`\[([^]]*)\]\(([^)]*\)?)\)`) var re_imgfix = regexp.MustCompile(`]*)>`) @@ -77,7 +77,7 @@ func markitzero(s string) string { s = re_zerolink.ReplaceAllString(s, `$1`) s = re_bolder.ReplaceAllString(s, "$1$2$3") s = re_italicer.ReplaceAllString(s, "$1$2$3") - s = re_quoter.ReplaceAllString(s, "
$1

") + s = re_quoter.ReplaceAllString(s, "

$1
$3

") s = strings.Replace(s, "\n---\n", "


", -1) s = re_lister.ReplaceAllStringFunc(s, func(m string) string { @@ -117,6 +117,7 @@ func markitzero(s string) string { // some final fixups s = strings.Replace(s, "\n", "
", -1) s = strings.Replace(s, "

", "
", -1) + s = strings.Replace(s, "
", "", -1) s = strings.Replace(s, "
", "
", -1)
 	s = strings.Replace(s, "
    ", "
      ", -1) s = strings.Replace(s, "


      ", "

      ", -1) diff --git a/views/style.css b/views/style.css index ea0ba4a..89f0194 100644 --- a/views/style.css +++ b/views/style.css @@ -23,6 +23,9 @@ blockquote { padding-left: 0.5em; border-left: 1px solid var(--fg-subtle); } +blockquote cite { + margin-left: 2em; +} table { display: block; max-width: 100%;