blob: 22209f5f7498b5be6fdc419485c9f7da1a96463e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "html.hpp"
TexoHTMLProducer::TexoHTMLProducer(TexoExporter &exporter):
TexoProducer(exporter)
{}
void TexoHTMLProducer::Put(const Texo &piece)
{
switch (piece.type) {
case Texo::character: exporter.Put(piece.c); break;
case Texo::paragraph_begin: exporter.PutStr("<p>"); break;
case Texo::paragraph_end: exporter.PutStr("</p>"); break;
case Texo::newline: exporter.PutStr("<br/>");
default: break;
}
}
TexoHTMLImporter::TexoHTMLImporter(TexoProducer &producer):
TexoImporter(producer)
{}
void TexoHTMLImporter::Put(const char c)
{
producer.Put(Texo(c));
}
|