Allow exclamation point after cite

Credit to 75236d6ae5
This commit is contained in:
discomrade 2023-01-12 09:46:07 -01:00 committed by -
parent 63fb6bea27
commit e01f35814c

View File

@ -2446,7 +2446,7 @@ function markup(&$body, $track_cites = false, $op = false) {
$tracked_cites = array();
// 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']) {
error($config['error']['toomanycites']);
}
@ -2493,7 +2493,7 @@ function markup(&$body, $track_cites = false, $op = false) {
}
// Cross-board linking
if (preg_match_all('/(^|[\s(])>>>\/(' . $config['board_regex'] . ')\/(?:(\d+)\/?)?(?=$|[\s,.?)])/um', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
if (preg_match_all('/(^|[\s(])>>>\/(' . $config['board_regex'] . ')\/(?:(\d+)\/?)?(?=$|[\s,.?!)])/um', $body, $cites, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
if (count($cites[0]) > $config['max_cites']) {
error($config['error']['toomanycross']);
}