28 lines
729 B
PHP
Executable File
28 lines
729 B
PHP
Executable File
<?php
|
|
|
|
namespace WMarkDown\Modules;
|
|
|
|
class Escapes extends \WMarkDown\Abstracts\Modules{
|
|
|
|
public function get_next_position($string){
|
|
|
|
if(
|
|
$this->more &&
|
|
$this->from < 0 &&
|
|
$this->more = preg_match('/\\\\(.)/m', $string, $this->matches, PREG_OFFSET_CAPTURE)
|
|
)
|
|
$this->from = $this->matches[0][1];
|
|
|
|
}
|
|
|
|
public function process($string, $modules, $level){
|
|
|
|
$this->length = strlen($this->matches[0][0]);
|
|
$this->to = $this->from + $this->length;
|
|
$this->content = $this->matches[1][0];
|
|
$this->html = $this->matches[1][0];
|
|
|
|
}
|
|
|
|
};
|