forked from leftypol/leftypol
issue#35 - lookahead regex bug on quotes and crossboard quotes
This commit is contained in:
parent
a5d933bcc2
commit
9ccfb6f33d
1 changed files with 2 additions and 2 deletions
|
@ -2017,7 +2017,7 @@ function markup(&$body, $track_cites = false, $op = false) {
|
||||||
print_err("Cites BEGIN");
|
print_err("Cites BEGIN");
|
||||||
|
|
||||||
// Cites
|
// Cites
|
||||||
if (isset($board) && preg_match_all('/(^|\s)>>(\d+?)([\s,.)?]|$)/m', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
|
if (isset($board) && preg_match_all('/(^|\s)>>(\d+?)((?=[\s,.)?!])|$)/m', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
|
||||||
if (count($cites[0]) > $config['max_cites']) {
|
if (count($cites[0]) > $config['max_cites']) {
|
||||||
error($config['error']['toomanycites']);
|
error($config['error']['toomanycites']);
|
||||||
}
|
}
|
||||||
|
@ -2067,7 +2067,7 @@ function markup(&$body, $track_cites = false, $op = false) {
|
||||||
print_err("Cross board linking BEGIN");
|
print_err("Cross board linking BEGIN");
|
||||||
|
|
||||||
// Cross-board linking
|
// Cross-board linking
|
||||||
if (preg_match_all('/(^|\s)>>>\/(' . $config['board_regex'] . 'f?)\/(\d+)?([\s,.)?]|$)/um', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
|
if (preg_match_all('/(^|\s)>>>\/(' . $config['board_regex'] . 'f?)\/(\d+)?((?=[\s,.)?!])|$)/um', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
|
||||||
if (count($cites[0]) > $config['max_cites']) {
|
if (count($cites[0]) > $config['max_cites']) {
|
||||||
error($config['error']['toomanycross']);
|
error($config['error']['toomanycross']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue