обновление которое может сломать часть примеров
This commit is contained in:
parent
3b7e186fda
commit
f11b9b3e56
7 changed files with 22 additions and 30 deletions
|
|
@ -3,13 +3,7 @@
|
|||
class Klein {
|
||||
public $code;
|
||||
|
||||
function __construct($html = null) {
|
||||
if ($html) {
|
||||
$this->compile($html);
|
||||
}
|
||||
}
|
||||
|
||||
function compile($html) {
|
||||
function _construct($html) {
|
||||
$pattern = array_map(function ($grammar) {
|
||||
list(, $result) = $grammar;
|
||||
$body = strtr($grammar[0], [' ' => "\s*", '+' => "\s+", ':var' => "(\w+(\s*\.\s*\w+)*)", ':id' => "(\w+)", '{{' => "{{\!?"]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue