FAQ
Is there any reference of how the comments are converted to HTML at using
godoc?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Hotei at May 4, 2013 at 3:28 pm
    You might try ~/go/src/cmd/godoc/format.go if you have source installed.
    FormatText() has some context info but I suspect you'll find it moderately
    difficult to patch anything new in without understanding the command pretty
    well. It doesn't look "excessively hard" but neither is it trivial.
    On Saturday, May 4, 2013 11:12:25 AM UTC-4, Archos wrote:

    Is there any reference of how the comments are converted to HTML at using
    godoc?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Archos at May 4, 2013 at 3:43 pm
    Hote, like you say the code is in http://golang.org/src/cmd/godoc/format.go

    But I would like that were added documentation (in the wiki or in
    http://golang.org/ref/) about how it's transformed, e.g. with 4 spaces at
    the beginning of the line, does this...

    El sábado, 4 de mayo de 2013 16:28:27 UTC+1, Hotei escribió:
    You might try ~/go/src/cmd/godoc/format.go if you have source installed.
    FormatText() has some context info but I suspect you'll find it moderately
    difficult to patch anything new in without understanding the command pretty
    well. It doesn't look "excessively hard" but neither is it trivial.
    On Saturday, May 4, 2013 11:12:25 AM UTC-4, Archos wrote:

    Is there any reference of how the comments are converted to HTML at using
    godoc?
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Minux at May 5, 2013 at 1:32 pm

    On Sat, May 4, 2013 at 11:43 PM, Archos wrote:

    Hote, like you say the code is in
    http://golang.org/src/cmd/godoc/format.go

    But I would like that were added documentation (in the wiki or in
    http://golang.org/ref/) about how it's transformed, e.g. with 4 spaces at
    the beginning of the line, does this...
    From http://golang.org/doc/articles/godoc_documenting_go_code.html:
    There are a few formatting rules that Godoc uses when converting comments
    to HTML:
    - Subsequent lines of text are considered part of the same paragraph; you
    must leave a blank line to separate paragraphs.
    - Pre-formatted text must be indented relative to the surrounding comment
    text (see gob's doc.go for an example).
    - URLs will be converted to HTML links; no special markup is necessary.
    Note that none of these rules requires you to do anything out of the
    ordinary.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Archos at May 5, 2013 at 3:18 pm
    But it is incomplete, i.e. wathcing the output "http://golang.org/cmd/go/"
    from "http://golang.org/src/cmd/go/doc.go",
    how are added the titles such as "Compile packages and dependencies"? I
    would say that with 2 blank lines to separate paragraphas. And it could
    have other more rule that I've lost.

    El domingo, 5 de mayo de 2013 14:31:48 UTC+1, minux escribió:

    On Sat, May 4, 2013 at 11:43 PM, Archos <[email protected] <javascript:>>wrote:
    Hote, like you say the code is in
    http://golang.org/src/cmd/godoc/format.go

    But I would like that were added documentation (in the wiki or in
    http://golang.org/ref/) about how it's transformed, e.g. with 4 spaces
    at the beginning of the line, does this...
    From http://golang.org/doc/articles/godoc_documenting_go_code.html:
    There are a few formatting rules that Godoc uses when converting comments
    to HTML:
    - Subsequent lines of text are considered part of the same paragraph; you
    must leave a blank line to separate paragraphs.
    - Pre-formatted text must be indented relative to the surrounding comment
    text (see gob's doc.go for an example).
    - URLs will be converted to HTML links; no special markup is necessary.
    Note that none of these rules requires you to do anything out of the
    ordinary.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Minux at May 5, 2013 at 3:41 pm

    On Sun, May 5, 2013 at 11:18 PM, Archos wrote:

    But it is incomplete, i.e. wathcing the output "http://golang.org/cmd/go/"
    from "http://golang.org/src/cmd/go/doc.go",
    how are added the titles such as "Compile packages and dependencies"? I
    would say that with 2 blank lines to separate paragraphas. And it could
    have other more rule that I've lost.
    If it's not complete, we should fix it.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 4, '13 at 3:12p
activeMay 5, '13 at 3:41p
posts6
users3
websitegolang.org

3 users in discussion

Archos: 3 posts Minux: 2 posts Hotei: 1 post

People

Translate

site design / logo © 2023 Grokbase