App\Libraries\BBCodeForDB::parseInlineSimple PHP Method

parseInlineSimple() public method

* Handles: - Bold (b) - Italic (i) - Image (img) - Strike (strike, s) - Underline (u) - Heading (heading)
public parseInlineSimple ( $text )
    public function parseInlineSimple($text)
    {
        foreach (['b', 'i', 'img', 'strike', 's', 'u', 'heading'] as $tag) {
            $text = preg_replace("#\\[{$tag}](.*?)\\[/{$tag}\\]#", "[{$tag}:{$this->uid}]\\1[/{$tag}:{$this->uid}]", $text);
        }
        return $text;
    }