Skip to content

Commit f4bc0ea

Browse files
committed
minor optimization
1 parent cfecca8 commit f4bc0ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandoc/haskell/vimhl.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ vimHl (Just fm@(Format fmt)) (CodeBlock (_, cls@(ft : _), namevals) contents)
4949
block <- withSystemTempFile "_vimhl_src." $ \src hsrc -> do
5050
T.hPutStr hsrc contents >> hFlush hsrc
5151
bracket (emptySystemTempFile "_vimhl_dst.") removeFile $ \dst -> do
52-
let vimrccmd = maybe "" (("--noplugin -u '" ++) . (++ "'"))
53-
vimrcPandoc
52+
let vimrccmd = maybe ""
53+
(("--noplugin -u '" ++) . (++ "'")) vimrcPandoc
5454
vimcmd = unwords
5555
[vimExe, "-Nen", cmds, vimrccmd, colorscheme
5656
,"-c 'set ft=" ++ T.unpack ft, "|"
@@ -76,7 +76,7 @@ vimHl (Just fm@(Format fmt)) (CodeBlock (_, cls@(ft : _), namevals) contents)
7676
unless (r == ExitSuccess) $ exitWith r
7777
T.readFile dst
7878
return $ RawBlock fm' $ wrap fm block
79-
where namevals' = map (map toLower . T.unpack *** T.unpack) namevals
79+
where namevals' = map (T.map toLower *** T.unpack) namevals
8080
fm' | fm == Format "latex" = fm
8181
| otherwise = Format "html"
8282
{- Note that Github markdown sanitizer strips CSS styles in HTML

0 commit comments

Comments
 (0)