mariotoffia / goasciidoc

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

The listing of constants is not properly documented #16

Closed tzeroem closed 2 years ago

tzeroem commented 2 years ago

The listing of constants is not properly documented

const (
    AuthorizeRemoteTxRequests string = "AuthorizeRemoteTxRequests"
    ClockAlignedDataInterval  string = "ClockAlignedDataInterval"
    ConnectionTimeOut         string = "ConnectionTimeOut"
    ConnectorPhaseRotation    string = "ConnectorPhaseRotation"
    GetConfigurationMaxKeys   string = "GetConfigurationMaxKeys"
    HeartbeatInterval         string = "HeartbeatInterval"
    LocalAuthorizeOffline     string = "LocalAuthorizeOffline"
    LocalPreAuthorize         string = "LocalPreAuthorize"
)

image

Adding a comment to the const group leads to multiple calls

// This is not Working
const (
    AuthorizeRemoteTxRequests string = "AuthorizeRemoteTxRequests"
    ClockAlignedDataInterval  string = "ClockAlignedDataInterval"
    ConnectionTimeOut         string = "ConnectionTimeOut"
    ConnectorPhaseRotation    string = "ConnectorPhaseRotation"
    GetConfigurationMaxKeys   string = "GetConfigurationMaxKeys"
    HeartbeatInterval         string = "HeartbeatInterval"
    LocalAuthorizeOffline     string = "LocalAuthorizeOffline"
    LocalPreAuthorize         string = "LocalPreAuthorize"
)

image

mariotoffia commented 2 years ago

Thanks, @tzeroem, for reporting this.

mariotoffia commented 2 years ago

Hi @tzeroem, I'm sorry but I cannot reproduce your problem. Could you please give me a simple go project that reproduce this problem?

Your first example (with documentation) is e.g. rendered here. I've also tried to add a comment above the const in the file (and rendered the solution) and it treats the comment as unbounded but the const is still rendering correctly.

Oh, are you using the default templates for render or have you customized those?

Cheers, Mario :)

mariotoffia commented 2 years ago

Hi @tzeroem, have you yet found some time to give me some feedback? Otherwise I'll close this issue and if you come back later and the problem still persists. I'll just open it again.

Cheers, Mario :)