Explorar o código

refactor(markdown): inline assignment

ayn2op hai 9 meses
pai
achega
467f46a0b4
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      internal/markdown/renderer.go

+ 1 - 2
internal/markdown/renderer.go

@@ -162,8 +162,7 @@ func (r *renderer) renderText(w io.Writer, node *ast.Text, entering bool, source
 }
 
 func (r *renderer) renderInline(w io.Writer, node *discordmd.Inline, entering bool) {
-	var start, end string
-	if entering {
+	if start, end := "", ""; entering {
 		switch node.Attr {
 		case discordmd.AttrBold:
 			start, end = "[::b]", "[::B]"