mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -06:00
Add a command name header to the 'help -t2t' output
This commit is contained in:
@@ -104,8 +104,10 @@ commandHelp full (co,info) = unlines . compact $ [
|
|||||||
|
|
||||||
commandHelpTags :: Bool -> (String,CommandInfo) -> String
|
commandHelpTags :: Bool -> (String,CommandInfo) -> String
|
||||||
commandHelpTags full (co,info) = unlines . compact $ [
|
commandHelpTags full (co,info) = unlines . compact $ [
|
||||||
"#VSPACE","","#NOINDENT",
|
"#VSPACE","",
|
||||||
lit co ++ equal (lit (longname info)) ++ ": " ++
|
"===="++hdrname++"====",
|
||||||
|
"#NOINDENT",
|
||||||
|
name ++ ": " ++
|
||||||
"//" ++ synopsis info ++ ".//"] ++ if full then [
|
"//" ++ synopsis info ++ ".//"] ++ if full then [
|
||||||
"","#TINY","",
|
"","#TINY","",
|
||||||
explanation info,
|
explanation info,
|
||||||
@@ -116,6 +118,9 @@ commandHelpTags full (co,info) = unlines . compact $ [
|
|||||||
"", "#NORMAL", ""
|
"", "#NORMAL", ""
|
||||||
] else []
|
] else []
|
||||||
where
|
where
|
||||||
|
hdrname = co ++ equal (longname info)
|
||||||
|
name = lit co ++ equal (lit (longname info))
|
||||||
|
|
||||||
lit = optionally (wrap "``")
|
lit = optionally (wrap "``")
|
||||||
equal = optionally (" = "++)
|
equal = optionally (" = "++)
|
||||||
verbatim = optionally (wrap ["```"])
|
verbatim = optionally (wrap ["```"])
|
||||||
|
|||||||
Reference in New Issue
Block a user