summaryrefslogtreecommitdiff
path: root/src/html.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.hpp')
-rw-r--r--src/html.hpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/html.hpp b/src/html.hpp
index b96200f..aa22cf1 100644
--- a/src/html.hpp
+++ b/src/html.hpp
@@ -6,44 +6,44 @@
#include "importer.hpp"
-class TexoProducerHTML: public TexoProducer {
+class TexoProducerHTML: public TexoProducerStrict {
public:
TexoProducerHTML(TexoExporter &exporter);
- void End();
-
- void Put(const Texo &piece);
-
- void Put(const TexoHeader &piece);
- void Put(const TexoParagraph &piece);
- void Put(const TexoCode &piece);
- void Put(const TexoQuote &piece);
-
- void Put(const TexoMono &piece);
- void Put(const TexoBold &piece);
- void Put(const TexoItalic &piece);
- void Put(const TexoUnderline &piece);
- void Put(const TexoStrike &piece);
-
- void Put(const TexoImage &piece);
- void Put(const TexoLink &piece);
- void Put(const TexoHorizontalRule &piece);
-
-private:
- void Close();
-
- enum {
- none = 0,
- header_1,
- header_2,
- header_3,
- header_4,
- header_5,
- header_6,
- paragraph,
- code,
- quote
- } opened_block;
+protected:
+ bool TruePut(char c);
+
+ bool StartCode();
+ bool StartHeader(int level);
+ bool StartParagraph();
+ bool StartQuote();
+
+ bool CloseCode();
+ bool CloseHeader(int level);
+ bool CloseParagraph();
+ bool CloseQuote();
+
+ bool StartBold();
+ bool StartItalic();
+ bool StartMono();
+ bool StartStrike();
+ bool StartUnderline();
+
+ bool CloseBold();
+ bool CloseItalic();
+ bool CloseMono();
+ bool CloseStrike();
+ bool CloseUnderline();
+
+ bool StartLink(const ScriptVariable &link, const ScriptVariable &title);
+ bool CloseLink(const ScriptVariable &link, const ScriptVariable &title);
+
+ bool TruePutImage(
+ const ScriptVariable &src,
+ const ScriptVariable &alt,
+ const ScriptVariable &title
+ );
+ bool TruePutHorizontalRule();
};