gdritter repos telml-markup / a443111
Changed a bit of phrasing Getty Ritter 8 years ago
1 changed file(s) with 8 addition(s) and 6 deletion(s). Collapse all Expand all
88 The `render` function takes a [`telml`](https://github.com/aisamanra/telml)
99 document and renders it into the
1010 [`blaze-html`](http://hackage.haskell.org/package/blaze-html-0.8.0.2)
11 [`Html`] type, which can then be rendered into HTML. For example, using
12 the following minimal program:
11 [`Html`](http://hackage.haskell.org/package/blaze-html-0.8.0.2/docs/Text-Blaze-Html.html#t:Html)
12 type, which can then be rendered into HTML. For example, the following
13 is a minimal program which interprets input on `stdin` and prints the
14 rendered HTML (or an error message) to `stdout`.
1315
1416 ~~~~{.haskell}
1517 module Main
5658
5759 ## Extended Usage
5860
59 The `renderWith` function takes a list of additional tags to understand.
60 It will always give precedence to the built-in tags, so one cannot overload
61 (for example) the built-in tag `em/1`. However, you can add any additional
62 tags that you want.
61 The `renderWith` function takes a list of additional tags and their
62 denotations (in the form of functions from `telml` fragments to
63 `blaze-html` fragments.) This allows you to add new tags to the
64 markup for particular purposes.
6365
6466 For example, here we add a tag so that `\hello{...}` will render out to
6567 the HTML string `<strong>Hello, ...!</strong>`: