summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-09-27 18:35:47 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-09-27 18:35:47 +0300
commit5dd4f05089608a66c435d6be36d4bc93dc425986 (patch)
treead3c7961983ffed2e225a1c6ae2f87df2664da89 /example
parent2eae362fd3f50325067fa3d7e13db6882df80e76 (diff)
downloadtexo-5dd4f05089608a66c435d6be36d4bc93dc425986.tar
texo-5dd4f05089608a66c435d6be36d4bc93dc425986.tar.xz
texo-5dd4f05089608a66c435d6be36d4bc93dc425986.zip
Prework for HTML.
Diffstat (limited to 'example')
-rw-r--r--example/filter_html.cpp18
-rw-r--r--example/plain_to_html.cpp2
2 files changed, 18 insertions, 2 deletions
diff --git a/example/filter_html.cpp b/example/filter_html.cpp
new file mode 100644
index 0000000..ced8f5f
--- /dev/null
+++ b/example/filter_html.cpp
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <html.hpp>
+#include <file.hpp>
+
+int main()
+{
+ TexoFileExporter exporter(stdout);
+ TexoHTMLProducer producer(exporter);
+ TexoHTMLImporter importer(producer);
+ importer.PutStr(
+ "<script>EVIL MAGIC</script>\n"
+ "<a href='#'>Some</a> br:<br/>\n"
+ "<p class='evil_too'>And paragraphs work well too...</p>\n"
+ "<b>You</b> <i>can</i> <del>use</del> <ins>some</ins> witchcraft.\n"
+ );
+ return 0;
+ return 0;
+}
diff --git a/example/plain_to_html.cpp b/example/plain_to_html.cpp
index 86171a6..9a81652 100644
--- a/example/plain_to_html.cpp
+++ b/example/plain_to_html.cpp
@@ -1,6 +1,4 @@
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <html.hpp>
#include <plain.hpp>
#include <file.hpp>