summaryrefslogtreecommitdiffstats
path: root/parser/pageparser/pagelexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'parser/pageparser/pagelexer.go')
-rw-r--r--parser/pageparser/pagelexer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/parser/pageparser/pagelexer.go b/parser/pageparser/pagelexer.go
index fcea560c4..8106758a9 100644
--- a/parser/pageparser/pagelexer.go
+++ b/parser/pageparser/pagelexer.go
@@ -216,7 +216,7 @@ func lexMainSection(l *pageLexer) stateFunc {
}
l2 = l.index(leftDelimSc)
- skip := minPositiveIndex(l1, l2)
+ skip := minIndex(l1, l2)
if skip > 0 {
l.pos += skip
@@ -730,12 +730,12 @@ func (l *pageLexer) currentRightShortcodeDelim() []byte {
// helper functions
-// returns the min index > 0
-func minPositiveIndex(indices ...int) int {
+// returns the min index >= 0
+func minIndex(indices ...int) int {
min := -1
for _, j := range indices {
- if j <= 0 {
+ if j < 0 {
continue
}
if min == -1 {