From 74a0f3537d8cb99b95dfdc5ba1cac7f59874cb8d Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 12 Nov 2019 15:04:19 -0500 Subject: [PATCH] basic hr support --- docs/honk.5 | 4 ++++ markitzero.go | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/honk.5 b/docs/honk.5 index 82eb926..db97558 100644 --- a/docs/honk.5 +++ b/docs/honk.5 @@ -62,6 +62,10 @@ URLs beginning with or .Dq https will be autolinked. +.It rules +Exactly three dashes on a line, +.Dq --- , +will become a horizontal rule. .El .Pp If the first line of a honk begins with diff --git a/markitzero.go b/markitzero.go index b70c386..1e41f7a 100644 --- a/markitzero.go +++ b/markitzero.go @@ -78,6 +78,7 @@ func markitzero(s string) string { s = re_bolder.ReplaceAllString(s, "$1$2$3") s = re_italicer.ReplaceAllString(s, "$1$2$3") s = re_quoter.ReplaceAllString(s, "
$1

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


", -1) s = re_lister.ReplaceAllStringFunc(s, func(m string) string { m = strings.Trim(m, "\n")