mariotoffia / goasciidoc

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

Ability to include source code within a comment by a annotation #7

Closed mariotoffia closed 3 years ago

mariotoffia commented 4 years ago

E.g. use @methodname to include a certain method in a [source,go] .... Copy full method definition ....

It should also be templated in order to allow for overrides

mariotoffia commented 3 years ago

This is actually already possible using asciidoc - but since code file is often in other directory than the output asciidoc file - I need to add a way to inject macros e.g. ${current} would be the current file being parsed (fully qualified path).

in this way it would be possible to use include::${goasciidoc:current:fq}[tag=the-tag,indent=0] (see asciidoc documentation abount tags).

mariotoffia commented 3 years ago

Fixed in v0.4.1