-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
templates: update to gomarkdoc v1.1.0
It uses a new parser and has changed some functions as well. Signed-off-by: Roman Khimov <[email protected]>
- Loading branch information
1 parent
faedb9e
commit 188e9eb
Showing
3 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{{- range .Blocks -}} | ||
{{- if eq .Kind "paragraph" -}} | ||
{{- paragraph .Text -}} | ||
{{- else if eq .Kind "code" -}} | ||
{{- codeBlock "" .Text -}} | ||
{{- else if eq .Kind "header" -}} | ||
{{- header (add .Level 1) .Text -}} | ||
{{- range (iter .Blocks) -}} | ||
{{- "\n" -}} | ||
{{- if eq .Entry.Kind "paragraph" -}} | ||
{{- template "text" .Entry.Spans -}} | ||
{{- else if eq .Entry.Kind "code" -}} | ||
{{- codeBlock "" (include "text" .Entry.Spans) -}} | ||
{{- else if eq .Entry.Kind "header" -}} | ||
{{- header (add .Entry.Level 1) (include "text" .Entry.Spans) -}} | ||
{{- end -}} | ||
{{- "\n" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
{{- if eq .Name "main" -}} | ||
{{- header .Level .Dirname -}} | ||
{{- else -}} | ||
{{- .Name | printf "%s contract" | header (add .Level 2) -}} | ||
{{- end -}} | ||
{{if eq .Name "main"}} | ||
{{- header .Level .Dirname}} | ||
{{else}} | ||
{{- .Name | printf "%s contract" | header (add .Level 2)}} | ||
{{end}} | ||
|
||
{{- template "doc" .Doc -}} | ||
{{template "doc" .Doc}} | ||
|
||
{{- range .Examples -}} | ||
{{- template "example" . -}} | ||
{{- end -}} | ||
|
||
{{- header (add .Level 3) "Contract methods" -}} | ||
|
||
{{- range .Funcs -}} | ||
{{- template "func" . -}} | ||
{{- end}} | ||
{{header (add .Level 3) "Contract methods"}} | ||
{{range .Funcs -}} | ||
{{- "\n"}}{{template "func" .}} | ||
{{- end -}} |