diff --git a/markitzero.go b/markitzero.go index 8f76b4f..c524794 100644 --- a/markitzero.go +++ b/markitzero.go @@ -75,10 +75,14 @@ func markitzero(s string) string { s = string(buf) // mark it zero - s = re_link.ReplaceAllStringFunc(s, linkreplacer) + if strings.Contains(s, "http") { + s = re_link.ReplaceAllStringFunc(s, linkreplacer) + } s = re_zerolink.ReplaceAllString(s, `$1`) - s = re_bolder.ReplaceAllString(s, "$1$2$3") - s = re_italicer.ReplaceAllString(s, "$1$2$3") + if strings.Contains(s, "*") { + s = re_bolder.ReplaceAllString(s, "$1$2$3") + s = re_italicer.ReplaceAllString(s, "$1$2$3") + } s = re_quoter.ReplaceAllString(s, "
$1
$3

") s = re_reciter.ReplaceAllString(s, "$1$2$3") s = strings.Replace(s, "\n---\n", "


", -1)