Fix Splitter tests.

This commit is contained in:
Daniel Kraus
2017-08-30 17:48:04 +02:00
parent b27dea8709
commit 9484e5b13d
2 changed files with 30 additions and 6 deletions

View File

@ -117,7 +117,7 @@ class Splitter {
// Since there is a user option to skip headings, we make this part of the expression
// optional. Note that in order to use preg_split(), it is important to have only one
// capturing subpattern (which precludes the use of conditional subpatterns).
( $this->config->parseHeadings ) ? $delimiter = '' : $delimiter = '=+.+?=+|';
( $this->config->parseHeadings ) ? $delimiter = '' : $delimiter = '^=+.+?=+|';
$urlPattern = '[a-z]+?\:\/\/(?:\S+\.)+\S+(?:\/.*)?';
$this->splitter = '/(' . // exclude from linking:
'\[\[.*?\]\]|' . // links