diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-10-31 20:05:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 12:05:54 +0000 |
commit | 5e6523aa57771f672dc0e8fb06431d4032308f23 (patch) | |
tree | 7fe31e46fc08922942c5141f8f93262b0b418607 /modules/markup | |
parent | 9914c9ab08d72434ea55e4c53a1b4528fdadc181 (diff) | |
download | gitea-5e6523aa57771f672dc0e8fb06431d4032308f23.tar.gz gitea-5e6523aa57771f672dc0e8fb06431d4032308f23.zip |
Update go dependencies (#32389)
Diffstat (limited to 'modules/markup')
-rw-r--r-- | modules/markup/markdown/transform_blockquote.go | 2 | ||||
-rw-r--r-- | modules/markup/markdown/transform_codespan.go | 2 | ||||
-rw-r--r-- | modules/markup/markdown/transform_heading.go | 2 | ||||
-rw-r--r-- | modules/markup/mdstripper/mdstripper.go | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/modules/markup/markdown/transform_blockquote.go b/modules/markup/markdown/transform_blockquote.go index d2dc025052..92dc500e69 100644 --- a/modules/markup/markdown/transform_blockquote.go +++ b/modules/markup/markdown/transform_blockquote.go @@ -45,7 +45,7 @@ func (g *ASTTransformer) extractBlockquoteAttentionEmphasis(firstParagraph ast.N if !ok { return "", nil } - val1 := string(node1.Text(reader.Source())) + val1 := string(node1.Text(reader.Source())) //nolint:staticcheck attentionType := strings.ToLower(val1) if g.attentionTypes.Contains(attentionType) { return attentionType, []ast.Node{node1} diff --git a/modules/markup/markdown/transform_codespan.go b/modules/markup/markdown/transform_codespan.go index 7aae1757e0..ff7d24eec9 100644 --- a/modules/markup/markdown/transform_codespan.go +++ b/modules/markup/markdown/transform_codespan.go @@ -69,7 +69,7 @@ func cssColorHandler(value string) bool { } func (g *ASTTransformer) transformCodeSpan(_ *markup.RenderContext, v *ast.CodeSpan, reader text.Reader) { - colorContent := v.Text(reader.Source()) + colorContent := v.Text(reader.Source()) //nolint:staticcheck if cssColorHandler(string(colorContent)) { v.AppendChild(v, NewColorPreview(colorContent)) } diff --git a/modules/markup/markdown/transform_heading.go b/modules/markup/markdown/transform_heading.go index 6d48f34d93..b78720e16d 100644 --- a/modules/markup/markdown/transform_heading.go +++ b/modules/markup/markdown/transform_heading.go @@ -19,7 +19,7 @@ func (g *ASTTransformer) transformHeading(_ *markup.RenderContext, v *ast.Headin v.SetAttribute(attr.Name, []byte(fmt.Sprintf("%v", attr.Value))) } } - txt := v.Text(reader.Source()) + txt := v.Text(reader.Source()) //nolint:staticcheck header := markup.Header{ Text: util.UnsafeBytesToString(txt), Level: v.Level, diff --git a/modules/markup/mdstripper/mdstripper.go b/modules/markup/mdstripper/mdstripper.go index 2a69d95224..fe0eabb473 100644 --- a/modules/markup/mdstripper/mdstripper.go +++ b/modules/markup/mdstripper/mdstripper.go @@ -46,7 +46,7 @@ func (r *stripRenderer) Render(w io.Writer, source []byte, doc ast.Node) error { coalesce := prevSibIsText r.processString( w, - v.Text(source), + v.Text(source), //nolint:staticcheck coalesce) if v.SoftLineBreak() { r.doubleSpace(w) |