Skip to content

Commit

Permalink
Remove unnecessary parameters on functions (fix warning).
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jan 7, 2025
1 parent 5161865 commit 15c109b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions skylighting-format-typst/src/Skylighting/Format/Typst.hs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ macrodef defaultcol tokstyles' tokt =
bg x = case tokenBackground tokf of
Nothing -> x
Just _c -> x -- TODO?
textstyle x = "text(" <> bf x <> it x <> co x <> x <> ")"
it x = if tokenItalic tokf
then "style: \"italic\","
else ""
bf x = if tokenBold tokf
then "weight: \"bold\","
else ""
co x = case tokenColor tokf `mplus` defaultcol of
Just c -> "fill: rgb(" <>
Text.pack (show (fromColor c :: String)) <> "),"
Nothing -> ""
textstyle x = "text(" <> bf <> it <> co <> x <> ")"
it = if tokenItalic tokf
then "style: \"italic\","
else ""
bf = if tokenBold tokf
then "weight: \"bold\","
else ""
co = case tokenColor tokf `mplus` defaultcol of
Just c -> "fill: rgb(" <>
Text.pack (show (fromColor c :: String)) <> "),"
Nothing -> ""

0 comments on commit 15c109b

Please sign in to comment.