Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiki Wiki CMS Groupware
Tiki
Commits
c8fd9a38
Commit
c8fd9a38
authored
Jan 25, 2023
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/parser/parserlib.php
View file @
c8fd9a38
...
...
@@ -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
=
[];
...
...
lib/wiki/editlib.php
View file @
c8fd9a38
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment