use wcf\data\user\group\UserGroup;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\importer\ImportHandler;
+use wcf\system\request\LinkHandler;
use wcf\system\WCF;
use wcf\util\ArrayUtil;
use wcf\util\UserRegistrationUtil;
$message = \preg_replace("/\r?\n/", ' \\0', $message);
+ $message = \preg_replace_callback('/@"([^"]+)"#p([0-9]+)/', static function (array $matches): string {
+ $username = $matches[1];
+ $postID = $matches[2];
+
+ $postLink = LinkHandler::getInstance()->getLink('Thread', [
+ 'application' => 'wbb',
+ 'postID' => $postID,
+ 'forceFrontend' => true,
+ ]) . '#post' . $postID;
+
+ return \sprintf(
+ "[%s](%s) @'%s'",
+ "\u{21A9}",
+ $postLink,
+ \str_replace("'", "''", $username)
+ );
+ }, $message);
+
$out = $parsedown->text($message);
$out = \preg_replace(