Mercurial Hosting > luan
changeset 324:b24a35612947
minor parsing improvement
git-svn-id: https://luan-java.googlecode.com/svn/trunk@325 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 09 Feb 2015 23:15:42 +0000 |
parents | cd2924a1052c |
children | 78a6a71afbfd |
files | core/src/luan/impl/LuanParser.java core/src/luan/modules/Html.luan |
diffstat | 2 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/core/src/luan/impl/LuanParser.java Mon Feb 09 04:33:21 2015 +0000 +++ b/core/src/luan/impl/LuanParser.java Mon Feb 09 23:15:42 2015 +0000 @@ -83,11 +83,11 @@ } In parens() { - return parens ? this : new In(true,template); + return parens ? this : new In(true,false); } In template() { - return template ? this : new In(parens,true); + return template ? this : new In(false,true); } } @@ -794,7 +794,7 @@ List<TableExpr.Field> fields = new ArrayList<TableExpr.Field>(); List<Expressions> builder = new ArrayList<Expressions>(); while( Field(fields,builder,inParens) && FieldSep(inParens) ); - Expressions exp = TemplateExpressions(in); + Expressions exp = TemplateExpressions(inParens); if( exp != null ) builder.add(exp); if( !parser.match('}') )
--- a/core/src/luan/modules/Html.luan Mon Feb 09 04:33:21 2015 +0000 +++ b/core/src/luan/modules/Html.luan Mon Feb 09 23:15:42 2015 +0000 @@ -30,10 +30,8 @@ function add_nofollow(html) for i, v in ipairs(html) do - if type(v) == "table" and v.type == "tag" then - if v.name == "a" then - v.attributes.rel = "nofollow" - end + if type(v) == "table" and v.type == "tag" and v.name == "a" then + v.attributes.rel = "nofollow" end end end