Safe Haskell | None |
---|---|
Language | Haskell2010 |
module for reading many template definitions from files
Synopsis
- getTemplates :: FilePath -> IO [(String, String)]
Documentation
parses template definitions read from the file path (using utf8)
definitions are separated by >=1 lines starting with #
if first line of definition looks like foo=bar or foo=*bar, then it returns
(foo, bar ++ rest of the lines (from definition) concatenated)
broken definitons are skipped
Templates created with =* will be cleaned from spaces and eol chars.
Example template file:
foo= <html> <body> <h1> hello </h1> </body> </html> ### bar=<b>BAR</b>