35#include <wx/tokenzr.h>
39#include "Configuration.h"
59 void DoReplace(wxString &line)
const
60 { Replace(&line, replaceBy); }
66 typedef std::list<RegexReplacer> replaceList;
67 replaceList regexReplaceList;
71 wxString MarkDown(wxString str);
75 {
return regexReplaceList; }
78 virtual wxString itemizeBegin() = 0;
79 virtual wxString itemizeEnd() = 0;
80 virtual wxString quoteChar() = 0;
81 virtual wxString quoteBegin() = 0;
82 virtual wxString quoteEnd() = 0;
83 virtual wxString itemizeItem() = 0;
84 virtual wxString itemizeEndItem() = 0;
85 virtual wxString NewLine() = 0;
95 virtual wxString quoteBegin()
override
96 {
return wxS(
"\\begin{quote}\n"); }
98 virtual wxString quoteEnd()
override
99 {
return wxS(
"\\end{quote}\n"); }
101 virtual wxString quoteChar()
override
102 {
return wxS(
"\\ensuremath{>}"); }
104 virtual wxString itemizeBegin()
override
105 {
return wxS(
"\\begin{itemize}\n"); }
107 virtual wxString itemizeEnd()
override
108 {
return wxS(
"\\end{itemize}\n"); }
110 virtual wxString itemizeItem()
override
111 {
return wxS(
"\\item "); }
113 virtual wxString itemizeEndItem()
override
114 {
return wxEmptyString; }
116 virtual wxString NewLine()
override
117 {
return wxS(
"\n\n"); }
127 virtual wxString quoteChar()
override
128 {
return wxS(
">"); }
130 virtual wxString quoteBegin()
override
131 {
return wxS(
"<blockquote>\n"); }
133 virtual wxString quoteEnd()
override
134 {
return wxS(
"</blockquote>\n"); }
136 virtual wxString itemizeBegin()
override
137 {
return wxS(
"<ul>\n"); }
139 virtual wxString itemizeEnd()
override
140 {
return wxS(
"</ul>\n"); }
142 virtual wxString itemizeItem()
override
143 {
return wxS(
"<li>"); }
145 virtual wxString itemizeEndItem()
override
146 {
return wxS(
"</li>\n"); }
148 virtual wxString NewLine()
override
149 {
return wxS(
"<br/>"); }
The configuration storage for the current worksheet.
Definition: Configuration.h:85
A markdown parser for HTML.
Definition: MarkDown.h:122
A pair of a regExp and a string that has to replace the matches.
Definition: MarkDown.h:52
A generic markdown Parser.
Definition: MarkDown.h:46
const replaceList & RegexReplaceList() const
A list of things we want to replace.
Definition: MarkDown.h:74
A markdown parser for TeX.
Definition: MarkDown.h:90