more || $this->from >= 0) return; $this->more = false; $last = null; $item = null; if(preg_match('/\\\\([_\*\'"\\\\])/', $string, $matches, PREG_OFFSET_CAPTURE)){ $this->more = true; $this->scape = true; $this->from = $matches[0][1]; $this->matches = $matches; }; foreach([ '/(\*)([^\*\\\\]+|\\\\.)\*/', '/(_)([^_\\\\]+|\\\\.)_/', '/(\*{2})(([^\*\\\\]+|\*[^\*]|\\\\.)+)\*{2}(\*)?/', '/(__)(([^_\\\\]+|_[^_]|\\\\.)+)__(_)?/', '/(\'{3})(([^\'\\\\]+|\'{1,2}[^\']|\\\\.)+)\'{3}(\'{2})?/', '/(""")(([^"\\\\]+|"{1,2}[^"]|\\\\.)+)"""("")?/', '/(\'{2})(([^\'\\\\]+|\'[^\']|\\\\.)+)\'{2}/', '/("")(([^"\\\\]+|"[^"]|\\\\.)+)""/' ] as $pattern) if(preg_match($pattern, $string, $matches, PREG_OFFSET_CAPTURE) && ($last === null || $last > $matches[0][1])){ $this->more = true; $this->scape = false; $this->from = $matches[0][1]; $this->matches = $matches; }; } public function process($string, $modules, $level){ $this->length = strlen($this->matches[0][0]); $this->to = $this->from + $this->length; $this->content = $this->matches[$this->scape ? 1 : 2][0]; $this->html = $this->scape ? $this->matches[1][0] : ( '<' . ($tag = strlen($this->matches[1][0]) == 2 ? "b" : "i") . '>' . \WMarkDown\Modules::format($this->wmarkdown, $this->matches[2][0] . (isset($this->matches[4]) ? $this->matches[4][0] : ''), ["paragraphs"], $modules)["content"] . '' ); } };