Commit 29f02e13 authored by Ma_124's avatar Ma_124

fixing formatting in godoc

parent 00a600ef
Pipeline #45981101 passed with stages
in 2 minutes and 1 second
...@@ -6,7 +6,8 @@ import ( ...@@ -6,7 +6,8 @@ import (
"strings" "strings"
) )
// * [<name>](<url>) - <desc> // Parses the code according to this pattern:
// * [<name>](<url>) - <desc>
var IFFMarkdown = &InputFileFormat{parseSimpleBulletMarkdownLine} var IFFMarkdown = &InputFileFormat{parseSimpleBulletMarkdownLine}
func parseSimpleBulletMarkdownLine(out io.Writer, l string, outFF *OutputFileFormat, ctx *Ctx) { func parseSimpleBulletMarkdownLine(out io.Writer, l string, outFF *OutputFileFormat, ctx *Ctx) {
...@@ -22,11 +23,13 @@ func parseSimpleBulletMarkdownLine(out io.Writer, l string, outFF *OutputFileFor ...@@ -22,11 +23,13 @@ func parseSimpleBulletMarkdownLine(out io.Writer, l string, outFF *OutputFileFor
} }
} }
// Prints the code according to this pattern:
// | Name | Desc | // | Name | Desc |
// |-----------------|--------| // |-----------------|--------|
// | [<name>](<url>) | <desc> | // | [<name>](<url>) | <desc> |
var OFFSimpleMarkdown = &OutputFileFormat{writeLiteralMd, writeSimpleItemMd, nil, nil} var OFFSimpleMarkdown = &OutputFileFormat{writeLiteralMd, writeSimpleItemMd, nil, nil}
// Prints the code according to this pattern:
// | Stars | Forks | Issues | Last Commit | Name | Desc | // | Stars | Forks | Issues | Last Commit | Name | Desc |
// |---------|---------|----------|---------------|-----------------|--------| // |---------|---------|----------|---------------|-----------------|--------|
// | <stars> | <forks> | <issues> | <last commit> | [<name>](<url>) | <desc> | // | <stars> | <forks> | <issues> | <last commit> | [<name>](<url>) | <desc> |
......
...@@ -6,15 +6,16 @@ import ( ...@@ -6,15 +6,16 @@ import (
"strings" "strings"
) )
// <name>\t<url>\t<desc> // Parses the code according to this pattern:
// "literal line // <name>\t<url>\t<desc>
// 'literal without newline // "literal line
// " continuation of previous line // 'literal without newline
// """ // " continuation of previous line
// block literal // """
// which spans over // block literal
// multiple lines // which spans over
// """ // multiple lines
// """
var IFFTabSep = &InputFileFormat{parseTabSepLine} var IFFTabSep = &InputFileFormat{parseTabSepLine}
func parseTabSepLine(out io.Writer, l string, outFF *OutputFileFormat, ctx *Ctx) { func parseTabSepLine(out io.Writer, l string, outFF *OutputFileFormat, ctx *Ctx) {
...@@ -56,13 +57,14 @@ func parseTabSepLine(out io.Writer, l string, outFF *OutputFileFormat, ctx *Ctx) ...@@ -56,13 +57,14 @@ func parseTabSepLine(out io.Writer, l string, outFF *OutputFileFormat, ctx *Ctx)
outFF.Item(out, lps[0], lps[1], lps[2], ctx) outFF.Item(out, lps[0], lps[1], lps[2], ctx)
} }
// <name>\t<url>\t<desc> // Prints the code according to this pattern:
// "literal line // <name>\t<url>\t<desc>
// 'literal without newline // "literal line
// " continuation of previous line // 'literal without newline
// "block literal // " continuation of previous line
// "which spans over // "block literal
// "multiple lines // "which spans over
// "multiple lines
var OFFTabSep = &OutputFileFormat{writeLiteralTabSep, writeItemTabSep, nil, nil} var OFFTabSep = &OutputFileFormat{writeLiteralTabSep, writeItemTabSep, nil, nil}
func writeLiteralTabSep(out io.Writer, l string, ctx *Ctx) { func writeLiteralTabSep(out io.Writer, l string, ctx *Ctx) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment