From 5dd4f05089608a66c435d6be36d4bc93dc425986 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 27 Sep 2019 18:35:47 +0300 Subject: Prework for HTML. --- src/html.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) (limited to 'src/html.cpp') diff --git a/src/html.cpp b/src/html.cpp index 22209f5..c9e3cde 100644 --- a/src/html.cpp +++ b/src/html.cpp @@ -8,20 +8,58 @@ TexoHTMLProducer::TexoHTMLProducer(TexoExporter &exporter): void TexoHTMLProducer::Put(const Texo &piece) { switch (piece.type) { - case Texo::character: exporter.Put(piece.c); break; - case Texo::paragraph_begin: exporter.PutStr("

"); break; - case Texo::paragraph_end: exporter.PutStr("

"); break; - case Texo::newline: exporter.PutStr("
"); + case Texo::character: exporter.Put(piece.c); break; + case Texo::paragraph_begin: exporter.PutStr("

"); break; + case Texo::paragraph_end: exporter.PutStr("

"); break; + case Texo::newline: exporter.PutStr("
"); break; + case Texo::bold_begin: exporter.PutStr(""); break; + case Texo::bold_end: exporter.PutStr(""); break; + case Texo::italic_begin: exporter.PutStr(""); break; + case Texo::italic_end: exporter.PutStr(""); break; + case Texo::strike_begin: exporter.PutStr(""); break; + case Texo::strike_end: exporter.PutStr(""); break; + case Texo::underline_begin: exporter.PutStr(""); break; + case Texo::underline_end: exporter.PutStr(""); break; + case Texo::link_begin: BeginLink(piece); break; + case Texo::link_end: exporter.PutStr(""); break; + case Texo::image: Image(piece); break; default: break; } } +void TexoHTMLProducer::BeginLink(const Texo &piece) +{ + exporter.PutStr("'); +} + +void TexoHTMLProducer::Image(const Texo &piece) +{ + exporter.PutStr(""); +} + TexoHTMLImporter::TexoHTMLImporter(TexoProducer &producer): TexoImporter(producer) {} void TexoHTMLImporter::Put(const char c) -{ +{ // TODO by automata producer.Put(Texo(c)); } -- cgit v1.2.3