diff options
| author | hallgren <hallgren@chalmers.se> | 2011-09-15 18:19:01 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2011-09-15 18:19:01 +0000 |
| commit | 751fd79763b4c3e76f97dc7cbb990ef3dcbebdca (patch) | |
| tree | 22d212a2882f3812cf46d809b1e7c9b1d7498987 /src | |
| parent | 167bc341cb3beb884469f0f2dccb8e57bf5be4f3 (diff) | |
Add a command name header to the 'help -t2t' output
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiler/GF/Command/Commands.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index 1684e0e58..8d7297f1e 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -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 ["```"]) |
