Move bb2diaspora() content to Content\Text\BBCode::toMarkdown

- Use self where appropriate
- Add BaseObject extension
This commit is contained in:
Hypolite Petovan 2018-03-04 17:34:59 -05:00
parent 49f99d94f6
commit fe5ce67ef8
3 changed files with 160 additions and 192 deletions

View file

@ -87,7 +87,7 @@ class Markdown extends BaseObject
// Escaping the hash tags
$s = preg_replace('/\#([^\s\#])/', '#$1', $s);
$s = Markdown::convert($s);
$s = self::convert($s);
$regexp = "/@\{(?:([^\}]+?); )?([^\} ]+)\}/";
$s = preg_replace_callback($regexp, ['self', 'diasporaMention2BBCodeCallback'], $s);