From 4e35640bb86020e70751a1789b3379c9ab3a11bc Mon Sep 17 00:00:00 2001 From: hallgren Date: Thu, 15 Sep 2011 18:19:01 +0000 Subject: [PATCH] Add a command name header to the 'help -t2t' output --- src/compiler/GF/Command/Commands.hs | 9 +++++++-- 1 file 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 ["```"])