1
0
forked from GitHub/gf-core

Add a command name header to the 'help -t2t' output

This commit is contained in:
hallgren
2011-09-15 18:19:01 +00:00
parent 167bc341cb
commit 751fd79763

View File

@@ -104,8 +104,10 @@ commandHelp full (co,info) = unlines . compact $ [
commandHelpTags :: Bool -> (String,CommandInfo) -> String
commandHelpTags full (co,info) = unlines . compact $ [
"#VSPACE","","#NOINDENT",
lit co ++ equal (lit (longname info)) ++ ": " ++
"#VSPACE","",
"===="++hdrname++"====",
"#NOINDENT",
name ++ ": " ++
"//" ++ synopsis info ++ ".//"] ++ if full then [
"","#TINY","",
explanation info,
@@ -116,6 +118,9 @@ commandHelpTags full (co,info) = unlines . compact $ [
"", "#NORMAL", ""
] else []
where
hdrname = co ++ equal (longname info)
name = lit co ++ equal (lit (longname info))
lit = optionally (wrap "``")
equal = optionally (" = "++)
verbatim = optionally (wrap ["```"])