Commit c8fd9a38 authored by Victor Emanouilov's avatar Victor Emanouilov
Browse files

[FIX] skip parsing argvariables when converting between tiki and markdown syntax

parent 6dd7cdd4
Pipeline #757168431 passed with stages
in 9 minutes and 58 seconds
......@@ -81,6 +81,7 @@ class ParserLib extends TikiDb_Bridge
'noparseplugins' => false,
'stripplugins' => false,
'noheaderinc' => false,
'noparseargvariables' => false,
'page' => $page,
'print' => false,
'parseimgonly' => false,
......@@ -1798,6 +1799,10 @@ class ParserLib extends TikiDb_Bridge
$tikilib = TikiLib::lib('tiki');
$smarty = TikiLib::lib('smarty');
if (! empty($this->option['noparseargvariables'])) {
return;
}
if ($prefs['feature_wiki_argvariable'] == 'y' && ! $this->option['wysiwyg']) {
if (preg_match_all("/\\{\\{((\w+)(\\|([^\\}]*))?)\\}\\}/", $data, $args, PREG_SET_ORDER)) {
$needles = [];
......
......@@ -1525,7 +1525,7 @@ class EditLib
$syntaxPluginResult = $wikiParserParsable->guess_syntax($data);
$source_syntax = $syntaxPluginResult['syntax'];
$wikiParserParsable->stripPlugins('code');
$html = $wikiParserParsable->parse(['noparseplugins' => true]);
$html = $wikiParserParsable->parse(['noparseplugins' => true, 'noparseargvariables' => true]);
$prefs['wiki_heading_links'] = $old_pref;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment