basic hr support

This commit is contained in:
Ted Unangst 2019-11-12 15:04:19 -05:00
parent dffec52815
commit 74a0f3537d
2 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,10 @@ URLs beginning with
or or
.Dq https .Dq https
will be autolinked. will be autolinked.
.It rules
Exactly three dashes on a line,
.Dq --- ,
will become a horizontal rule.
.El .El
.Pp .Pp
If the first line of a honk begins with If the first line of a honk begins with

View File

@ -78,6 +78,7 @@ func markitzero(s string) string {
s = re_bolder.ReplaceAllString(s, "$1<b>$2</b>$3") s = re_bolder.ReplaceAllString(s, "$1<b>$2</b>$3")
s = re_italicer.ReplaceAllString(s, "$1<i>$2</i>$3") s = re_italicer.ReplaceAllString(s, "$1<i>$2</i>$3")
s = re_quoter.ReplaceAllString(s, "<blockquote>$1</blockquote><p>") s = re_quoter.ReplaceAllString(s, "<blockquote>$1</blockquote><p>")
s = strings.Replace(s, "\n---\n", "<hr><p>", -1)
s = re_lister.ReplaceAllStringFunc(s, func(m string) string { s = re_lister.ReplaceAllStringFunc(s, func(m string) string {
m = strings.Trim(m, "\n") m = strings.Trim(m, "\n")