cfad47cfa3/t3compiler/tads3/test/data/htmlify.t

4b825dc642cb6eb9a060e54bf8d69288fbee4904cfad47cfa334b206c65f22086bcc5d63e6f70944
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