all repos — honk @ e015662570fbf10b948c8d488acc22543eca4174

my fork of honk

can inline remnant of old marker code
Ted Unangst tedu@tedunangst.com
Wed, 21 Jun 2023 01:36:22 -0400
commit

e015662570fbf10b948c8d488acc22543eca4174

parent

c617a17cf9533832487a08802bf407774b139598

2 files changed, 4 insertions(+), 27 deletions(-)

jump to
M fun.gofun.go

@@ -211,7 +211,8 @@

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 @@ } else {

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 } }
D markitzero.go

@@ -1,25 +0,0 @@

-// -// Copyright (c) 2019 Ted Unangst <tedu@tedunangst.com> -// -// 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) -}