diff --git a/fun.go b/fun.go index af41b87..71999a0 100644 --- a/fun.go +++ b/fun.go @@ -211,7 +211,8 @@ func replaceimgsand(zap map[string]bool, absolute bool) func(node *html.Node) st func translatechonk(ch *Chonk) { noise := ch.Noise if ch.Format == "markdown" { - noise = markitzero(noise) + var marker mz.Marker + noise = marker.Mark(noise) } var htf htfilter.Filter htf.SpanClasses = allowedclasses @@ -300,7 +301,8 @@ func precipitate(honk *Honk) { honk.Precis = noise[:idx] noise = noise[idx+1:] } - honk.Precis = markitzero(strings.TrimSpace(honk.Precis)) + var marker mz.Marker + honk.Precis = marker.Mark(strings.TrimSpace(honk.Precis)) honk.Noise = noise } } diff --git a/markitzero.go b/markitzero.go deleted file mode 100644 index 49b3c74..0000000 --- a/markitzero.go +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright (c) 2019 Ted Unangst -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -package main - -import ( - "humungus.tedunangst.com/r/webs/mz" -) - -func markitzero(s string) string { - var marker mz.Marker - return marker.Mark(s) -}