Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
I
IfAuthEx DokuWiki Plugin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Progetti
IfAuthEx DokuWiki Plugin
Commits
1b007b32
Commit
1b007b32
authored
Jan 10, 2019
by
Pietro Saccardi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: would not correctly find brackets.
parent
feee525d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
syntax/parser.php
syntax/parser.php
+6
-11
No files found.
syntax/parser.php
View file @
1b007b32
...
...
@@ -357,19 +357,14 @@ class ElementDefinition {
if
(
$args
[
$position
]
->
definition
()
!=
$openTokDef
)
{
return
0
;
}
if
(
$nested
)
{
// Get the longest sequence
for
(
$i
=
count
(
$args
)
-
1
;
$i
>
$position
;
--
$i
)
{
if
(
$args
[
$i
]
->
definition
()
==
$closeTokDef
)
{
return
$i
-
$position
+
1
;
}
}
}
else
{
// Get the shortest sequence
for
(
$i
=
$position
+
1
;
$i
<
count
(
$args
);
++
$i
)
{
if
(
$args
[
$i
]
->
definition
()
==
$closeTokDef
)
{
$nest
=
1
;
for
(
$i
=
$position
+
1
;
$i
<
count
(
$args
);
++
$i
)
{
if
(
$args
[
$i
]
->
definition
()
==
$closeTokDef
)
{
if
(
--
$nest
<=
0
)
{
return
$i
-
$position
+
1
;
}
}
else
if
(
$nested
&&
$args
[
$i
]
->
definition
()
==
$openTokDef
)
{
++
$nest
;
}
}
return
1
;
// Which means unmatched sequence
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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