Skip to content

Commit

Permalink
make regex pattern non-greedy
Browse files Browse the repository at this point in the history
The connect ".*~~" regex pattern matches other markup that uses "~~" such "~~NOTOC~~".
  • Loading branch information
ssahara committed Jan 10, 2014
1 parent c273ff0 commit 90a81a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getPType(){ return 'normal'; }
function getSort(){ return 990; }

function connectTo($mode) {
$this->Lexer->addSpecialPattern('~~HIDEPAGE.*~~', $mode, 'plugin_hidepages');
$this->Lexer->addSpecialPattern('~~HIDEPAGE.*?~~', $mode, 'plugin_hidepages');
}

function handle($match, $state, $pos, &$handler){
Expand Down

0 comments on commit 90a81a4

Please sign in to comment.