diff --git a/htmlcheck/checker.go b/htmlcheck/checker.go index f34ef42..158c57d 100644 --- a/htmlcheck/checker.go +++ b/htmlcheck/checker.go @@ -258,7 +258,7 @@ func (ht *htmlCheckerImpl) emitRune(ch rune, filters []outputFilter, countCols b if len(filters) > 0 { // try each output filter to see what we can do for _, of := range filters { - handled = of.tryOutputRune(ht.outputBuffer, ch) + handled = of.tryOutputRune(&ht.outputBuffer, ch) if handled { break // found a filter to handle it, done } @@ -314,7 +314,7 @@ func (ht *htmlCheckerImpl) emitString(str string, filters []outputFilter, countC // one of the output filters stopped us, try invoking it tmpch, bsiz := utf8.DecodeRuneInString(temp[outputLen:]) outputLen += bsiz - if !stopper.tryOutputRune(ht.outputBuffer, tmpch) { + if !stopper.tryOutputRune(&ht.outputBuffer, tmpch) { ht.outputBuffer.WriteRune(tmpch) } if realCountCols { diff --git a/htmlcheck/filter.go b/htmlcheck/filter.go index ca7b839..59ed830 100644 --- a/htmlcheck/filter.go +++ b/htmlcheck/filter.go @@ -13,7 +13,7 @@ import "strings" // outputFilter is the interface for an HTML checker output filter. type outputFilter interface { - tryOutputRune(strings.Builder, rune) bool + tryOutputRune(*strings.Builder, rune) bool matchRune(rune) bool lengthNoMatch(string) int } @@ -34,7 +34,7 @@ type htmlEncodingFilter struct{} const htmlEscapedChars = "<>&" // tryOutputRune outputs a rune that needs to be escaped. -func (f *htmlEncodingFilter) tryOutputRune(buf strings.Builder, ch rune) bool { +func (f *htmlEncodingFilter) tryOutputRune(buf *strings.Builder, ch rune) bool { switch ch { case '<': buf.WriteString("<") diff --git a/ui/views/new_topic.jet b/ui/views/new_topic.jet index e83058b..ea78e94 100644 --- a/ui/views/new_topic.jet +++ b/ui/views/new_topic.jet @@ -56,7 +56,7 @@
@@ -64,7 +64,7 @@
-
+ class="w-full px-3 py-2 border border-gray-300 rounded font-mono text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">{{ pb | raw }}