From 6566ef5fa2e2723922fd453a7c3240f6a514c0f9 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 26 Jan 2019 20:57:44 -0800 Subject: [PATCH] add: fix breakage when creating file, ignore backslash in names line --- hledger/Hledger/Cli/CliOptions.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/CliOptions.hs b/hledger/Hledger/Cli/CliOptions.hs index cbfba50a0..bc8b96fce 100644 --- a/hledger/Hledger/Cli/CliOptions.hs +++ b/hledger/Hledger/Cli/CliOptions.hs @@ -279,7 +279,7 @@ parseHelpTemplate t = [] -> Nothing (l:ls) -> Just (names, shorthelp, longhelplines) where - names = words $ map (\c -> if c==',' then ' ' else c) l + names = words $ map (\c -> if c `elem` [',','\\'] then ' ' else c) l (shorthelpls, longhelpls) = break (== "_FLAGS_") ls shorthelp = unlines $ reverse $ dropWhile null $ reverse shorthelpls longhelplines = dropWhile null $ drop 1 longhelpls