-------------------------------------------------------------------------------- module Hable.Style.OrgMode ( orgModeCharset , OrgModeStyle(..) ) where -------------------------------------------------------------------------------- import Hable.BoxChar -------------------------------------------------------------------------------- type OrgModeStyle = () -------------------------------------------------------------------------------- -- | A 'charset' based on the syntax of Emacs' -- spreadsheet. It uses @+@, @-@ and @|@ and ignores any style. -- -- An example output: -- -- >>> putStr (hable myConfig { charset = orgModeCharset, hStyleAt = \_ _ -> Just (), vStyleAt = \_ _ -> Just () } myTable) -- |----------------------+------------------------------------------------| -- | Name | Hable | -- |----------------------+------------------------------------------------| -- | Synopsis | customizable pretty printer library for tables | -- |----------------------+------------------------------------------------| -- | License | Public Domain / Unlicense | -- |----------------------+------------------------------------------------| orgModeCharset :: BoxChar style -> String orgModeCharset (Dash _) = "-" orgModeCharset (Angled HCenter _ _ _) = "+" orgModeCharset _ = "|"