Compare commits
No commits in common. "a71c3da12953df71f686b220080d677eb30f0ba7" and "78b9e5e0433a1764b4daf101e2ea9f71431f365c" have entirely different histories.
a71c3da129
...
78b9e5e043
11
parser.cpp
11
parser.cpp
@ -155,11 +155,8 @@ std::string Parser::parse(const PageDao &pagedao, UrlProvider &provider, const s
|
|||||||
{
|
{
|
||||||
std::string tag = match.str(1);
|
std::string tag = match.str(1);
|
||||||
std::string content = match.str(2);
|
std::string content = match.str(2);
|
||||||
std::string justreplace[] = {"b", "i", "u", "ul", "li", "ol"};
|
std::string justreplace[] = {"b", "i", "u", "ul", "li", "ol", "code", "blockquote"};
|
||||||
if(tag != "code" && tag != "blockquote")
|
content = parse(pagedao, provider, content, callback);
|
||||||
{
|
|
||||||
content = parse(pagedao, provider, content, callback);
|
|
||||||
}
|
|
||||||
if(std::find(std::begin(justreplace), std::end(justreplace), tag) != std::end(justreplace))
|
if(std::find(std::begin(justreplace), std::end(justreplace), tag) != std::end(justreplace))
|
||||||
{
|
{
|
||||||
return "<" + tag + ">" + content + "</" + tag + ">";
|
return "<" + tag + ">" + content + "</" + tag + ">";
|
||||||
@ -178,10 +175,6 @@ std::string Parser::parse(const PageDao &pagedao, UrlProvider &provider, const s
|
|||||||
{
|
{
|
||||||
return "<" + tag + " id='" + content + "'>" + content + "</" + tag + ">";
|
return "<" + tag + " id='" + content + "'>" + content + "</" + tag + ">";
|
||||||
}
|
}
|
||||||
if(tag == "code" || tag == "blockquote")
|
|
||||||
{
|
|
||||||
return "<pre><" + tag + ">"+ utils::strreplace(content, "\r\n", "\n") + "</"+tag+"></pre>";
|
|
||||||
}
|
|
||||||
return callback(tag, content);
|
return callback(tag, content);
|
||||||
});
|
});
|
||||||
result = utils::strreplace(result, "\r\n", "<br>");
|
result = utils::strreplace(result, "\r\n", "<br>");
|
||||||
|
@ -5,10 +5,8 @@
|
|||||||
<li style="font-size: 10pt">Powered by qswiki</li>
|
<li style="font-size: 10pt">Powered by qswiki</li>
|
||||||
</ul>
|
</ul>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="{qswiki:config:highlightjspath}"></script>
|
|
||||||
<script>
|
<script>
|
||||||
{qswiki:include:js_session_refresh}
|
{qswiki:include:js_session_refresh}
|
||||||
hljs.highlightAll();
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -3,8 +3,6 @@
|
|||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" type="text/css" href="{qswiki:config:csspath}">
|
<link rel="stylesheet" type="text/css" href="{qswiki:config:csspath}">
|
||||||
<link rel="stylesheet" href="{qswiki:config:highlightjsstyle}">
|
|
||||||
|
|
||||||
<title>{qswiki:var:title}</title>
|
<title>{qswiki:var:title}</title>
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user