From 18790744cbb5b1f77eb8b17e70636508ac8eb228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Fri, 26 Jan 2024 15:45:13 +0100 Subject: [PATCH] fix: Make softlinebreak public --- renderer/html/html.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderer/html/html.go b/renderer/html/html.go index 8738c2a..3d2e3fd 100644 --- a/renderer/html/html.go +++ b/renderer/html/html.go @@ -116,7 +116,7 @@ const ( EastAsianLineBreaksCSS3Draft ) -func (b EastAsianLineBreaks) softLineBreak(thisLastRune rune, siblingFirstRune rune) bool { +func (b EastAsianLineBreaks) SoftLineBreak(thisLastRune rune, siblingFirstRune rune) bool { switch b { case EastAsianLineBreaksNone: return false @@ -740,7 +740,7 @@ func (r *Renderer) renderText(w util.BufWriter, source []byte, node ast.Node, en if siblingText := sibling.(*ast.Text).Text(source); len(siblingText) != 0 { thisLastRune := util.ToRune(value, len(value)-1) siblingFirstRune, _ := utf8.DecodeRune(siblingText) - if r.EastAsianLineBreaks.softLineBreak(thisLastRune, siblingFirstRune) { + if r.EastAsianLineBreaks.SoftLineBreak(thisLastRune, siblingFirstRune) { _ = w.WriteByte('\n') } }