Skip to content

Commit 918ba3c

Browse files
committed
filter: lua: add TODO
1 parent e3c853d commit 918ba3c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

filter/lua.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import (
99
lua "github.com/yuin/gopher-lua"
1010
)
1111

12-
func ticks(s string) string { return "`" + s + "`" }
13-
func startBlock(lang string) string { return "```" + lang }
14-
func endBlock() string { return "```" }
1512

1613
var luaHelp = `
1714
This filter runs a baker filter defined in a LUA script.
@@ -105,6 +102,13 @@ It allows to lookup a field index by its name, returning the index or nil if no
105102
` + ticks("fieldNames") + ` is an integed-indexed table, in other words an array, containing all field names, as ` + ticks("FieldNames") + ` in Go.
106103
`
107104

105+
// TODO(arl): ideally this functions should not be required, but writing
106+
// markdown documentation in Go strings is tedious and error-prone.
107+
108+
func ticks(s string) string { return "`" + s + "`" }
109+
func startBlock(lang string) string { return "```" + lang }
110+
func endBlock() string { return "```" }
111+
108112
// LUADesc describes the LUA filter
109113
var LUADesc = baker.FilterDesc{
110114
Name: "LUA",

0 commit comments

Comments
 (0)