parser: Add [s]
This commit is contained in:
parent
3bc51b9d34
commit
64b6e7e61c
@ -148,14 +148,14 @@ std::string Parser::parse(const PageDao &pagedao, UrlProvider &provider, const s
|
|||||||
std::string result;
|
std::string result;
|
||||||
// we don't care about commands, but we nevertheless replace them with empty strings
|
// we don't care about commands, but we nevertheless replace them with empty strings
|
||||||
std::regex tagfinder(
|
std::regex tagfinder(
|
||||||
R"(\[(b|i|u|li||ul|ol|code|blockquote|img|link|wikilink|h\d|cmd:visible|cmd:rename|cmd:redirect|cmd:pagetitle|cmd:allowinclude|category|dynamic:postlist|dynamic:includepage|dynamic:getvar|dynamic:setvar)*?\]((\s|\S)*?)\[/\1])");
|
R"(\[(b|i|u|s|li||ul|ol|code|blockquote|img|link|wikilink|h\d|cmd:visible|cmd:rename|cmd:redirect|cmd:pagetitle|cmd:allowinclude|category|dynamic:postlist|dynamic:includepage|dynamic:getvar|dynamic:setvar)*?\]((\s|\S)*?)\[/\1])");
|
||||||
result = utils::regex_callback_replacer(
|
result = utils::regex_callback_replacer(
|
||||||
tagfinder, content,
|
tagfinder, content,
|
||||||
[&](std::smatch &match)
|
[&](std::smatch &match)
|
||||||
{
|
{
|
||||||
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", "s"};
|
||||||
if(tag != "code" && tag != "blockquote")
|
if(tag != "code" && tag != "blockquote")
|
||||||
{
|
{
|
||||||
content = parse(pagedao, provider, content, callback);
|
content = parse(pagedao, provider, content, callback);
|
||||||
|
Loading…
Reference in New Issue
Block a user