Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加 RAW 类型。 #47

Merged
merged 2 commits into from
Jun 11, 2015
Merged

添加 RAW 类型。 #47

merged 2 commits into from
Jun 11, 2015

Conversation

2betop
Copy link
Contributor

@2betop 2betop commented Jun 11, 2015

Hello,又来冒昧的提个 pull request, 不知道这个修改是否合理哈,麻烦看一眼。

当遇到以下内容的时候, parser 将其归类为了 content 内型。当我把这段 ast 还原的时候,#[[]]# 丢失了,所以如果能将其归类为 raw 我认为更合理。

render 对应的地方也修改了!

#[[
#foreach ($woogie in $boogie)
  nothing will happen to $woogie
#end
]]#

@shepherdwind
Copy link
Owner

正常render的时候是应该去掉注释的吧?parse这样是没有问题的

@shepherdwind
Copy link
Owner

另外,最好加一个parse测试用例,保证raw类型的确实工作正常

@2betop
Copy link
Contributor Author

2betop commented Jun 11, 2015

用例添加完了,那个不是 comment 是 原始内容,是希望不被解析的原始内容。

正常 render 是输出原始内容就行了,不进行变量替换之类的工作。

@shepherdwind
Copy link
Owner

好吧,我看错了,我以为那个是注释。这样可以的。我合并了

shepherdwind added a commit that referenced this pull request Jun 11, 2015
@shepherdwind shepherdwind merged commit 737e654 into shepherdwind:master Jun 11, 2015
@2betop
Copy link
Contributor Author

2betop commented Jun 11, 2015

哈哈,坐等发新版!

@shepherdwind
Copy link
Owner

已发布0.6.2

@2betop
Copy link
Contributor Author

2betop commented Jun 11, 2015

赞,thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants