mariotoffia / goasciidoc

Document your go code using asciidoc instead of godoc
Apache License 2.0
18 stars 0 forks source link

Variables inside var blocks are duplicated #11

Closed ccremer closed 3 years ago

ccremer commented 3 years ago

Hi! First of all this is an awesome project!

I noticed that in var blocks like

var(
  ...
)

the variables are duplicated.

image

ccremer commented 3 years ago

Ah, I was able to reconfigure the template. Instead of .FullDecl, I'm using just .Decl:

=== {{.VarAssignment.Name}}
[source, go]
----
{{.VarAssignment.Decl}}
----
{{.VarAssignment.Doc}}
mariotoffia commented 3 years ago

Thanks! @ccremer :) - I'll add this as a bug! - It should be fixed in next release https://github.com/mariotoffia/goasciidoc/blob/master/asciidoc/defaults.go#L130

Cheers, Mario :)

mariotoffia commented 3 years ago

@ccremer I've changed the default to use .Decl instead.