Skip to content

Commit

Permalink
Add asciiDoubleS style
Browse files Browse the repository at this point in the history
  • Loading branch information
Xitian9 authored and muesli4 committed Sep 26, 2021
1 parent 1bdd223 commit c81c5ef
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ main = putStrLn $ tableString [ column (expandUntil 30) left (charAlign ':') def
bigNum = "200300400500600.2"
smallNum = "4.20000000"
styles = [ asciiS
, asciiDoubleS
, asciiRoundS
, unicodeS
, unicodeRoundS
Expand Down
27 changes: 27 additions & 0 deletions src/Text/Layout/Table/Style.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,33 @@ asciiS = TableStyle
, groupBottomH = "-"
}

-- | Like 'asciiS', but uses double lines and double pluses for the header joints.
asciiDoubleS :: TableStyle
asciiDoubleS = TableStyle
{ headerSepH = "-"
, headerSepLC = "++"
, headerSepRC = "++"
, headerSepC = "++"
, headerTopL = "++"
, headerTopR = "++"
, headerTopC = "++"
, headerTopH = "-"
, headerV = "||"
, groupV = "||"
, groupSepH = "-"
, groupSepC = "++"
, groupSepLC = "++"
, groupSepRC = "++"
, groupTopC = "++"
, groupTopL = "++"
, groupTopR = "++"
, groupTopH = "-"
, groupBottomC = "++"
, groupBottomL = "++"
, groupBottomR = "++"
, groupBottomH = "-"
}

-- | Uses special unicode characters to draw clean thin boxes.
unicodeS :: TableStyle
unicodeS = TableStyle
Expand Down

0 comments on commit c81c5ef

Please sign in to comment.