| | 1 | #include "tads.h" |
| | 2 | #include "t3.h" |
| | 3 | |
| | 4 | main(args) |
| | 5 | { |
| | 6 | say_htmlify('This is a <test> of htmlify!'); |
| | 7 | say_htmlify('& this is another!'); |
| | 8 | say_htmlify('tab\ttab\ttab (not keeping tabs)'); |
| | 9 | say_htmlify('tab\ttab\ttab\t(keeping tabs)', HtmlifyTranslateTabs); |
| | 10 | say_htmlify('newline\nnewline\nnewline (not keeping newlines)'); |
| | 11 | say_htmlify('newline\n\ttab, newline\n\ttab (keeping newlines and tabs)', |
| | 12 | HtmlifyTranslateTabs | HtmlifyTranslateNewlines); |
| | 13 | say_htmlify('lots of spaces'); |
| | 14 | say_htmlify('keeping lots of spaces', HtmlifyTranslateSpaces); |
| | 15 | } |
| | 16 | |
| | 17 | say_htmlify(str, [flags]) |
| | 18 | { |
| | 19 | tadsSay(str.htmlify(flags...).htmlify()); |
| | 20 | tadsSay('\n'); |
| | 21 | } |
| | 22 | |