Skip to content

Commit

Permalink
doc: add more doc on readme
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Nov 15, 2021
1 parent ba9b48b commit dc9dcf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ My develop tags:

## More usage

The syntax is the same as that of the PHP native template, and the special syntax is added just to make it easier to use.
The syntax is the same as the PHP native template, and the special syntax added is just to make it more convenient to use.

- `EasyTemplate` enables output filtering by default, which can be used to render view templates.
- `TextTemplate` turns off output filtering and is mainly used for text processing, code generation, etc.
Expand Down Expand Up @@ -204,6 +204,8 @@ tags:

### Add comments

The contents wrapped with `{{` and `}}` will be ignored as comments.

```php
{{# comments ... #}}{{ $name }} // inhere
```
Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ My develop tags:

## 更多使用说明

语法跟PHP原生模板一样的,加入的特殊语法使用只是为了使用更加方便
语法跟PHP原生模板一样的,加入的特殊语法只是为了让使用更加方便

- `EasyTemplate` 默认开启输出过滤,可用于渲染视图模板
- `TextTemplate` 则是关闭了输出过滤,主要用于文本处理,代码生成等
Expand Down Expand Up @@ -125,7 +125,7 @@ $t->addDirective($name, $handler);

### 快速访问数组值

可以使用`.` 来快速访问数组值。
可以使用 `.` 来快速访问数组值。原来的写法也是可用的,简洁写法也会自动转换为原生写法

```php
$arr = [
Expand Down Expand Up @@ -203,7 +203,7 @@ tags:

### 模板中添加注释

`{{#``#}}` 包裹的内容将会当做注释忽略
`{{#``#}}` 包裹的内容将会当做注释忽略

```text
{{# comments ... #}}{{ $name }} // inhere
Expand Down

0 comments on commit dc9dcf6

Please sign in to comment.