diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-08 19:49:40 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-08 19:56:11 +0300 |
commit | 3047ed6100a56a529f26e43ada0a3fc3c3815c3e (patch) | |
tree | 9648d5a74bae9cbd90670a8bfa0af47189e4536f /src/html.hpp | |
parent | c6419eed96f2832b1de2b94d711552efaa9b172d (diff) | |
download | texo-3047ed6100a56a529f26e43ada0a3fc3c3815c3e.tar texo-3047ed6100a56a529f26e43ada0a3fc3c3815c3e.tar.xz texo-3047ed6100a56a529f26e43ada0a3fc3c3815c3e.zip |
[texo] Full rewrite of inner representation.
Diffstat (limited to 'src/html.hpp')
-rw-r--r-- | src/html.hpp | 70 |
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(); }; |