Mercurial Hosting > luan
changeset 586:a140be489a72
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 24 Aug 2015 02:17:46 -0600 |
parents | bb3818249dfb |
children | fa281ee942c8 |
files | core/src/luan/impl/ThemeParser.java core/src/luan/modules/StringLuan.java |
diffstat | 2 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r bb3818249dfb -r a140be489a72 core/src/luan/impl/ThemeParser.java --- a/core/src/luan/impl/ThemeParser.java Fri Aug 14 06:35:20 2015 -0600 +++ b/core/src/luan/impl/ThemeParser.java Mon Aug 24 02:17:46 2015 -0600 @@ -181,6 +181,7 @@ Tag tag = parseBlockTag(); if( tag == null ) return parser.failure(null); + parser.match('\r'); parser.match('\n'); // ignore newline Stmt rtn = null; if( tag.name.equals("Set") ) { String name = tag.attrs.remove("name");
diff -r bb3818249dfb -r a140be489a72 core/src/luan/modules/StringLuan.java --- a/core/src/luan/modules/StringLuan.java Fri Aug 14 06:35:20 2015 -0600 +++ b/core/src/luan/modules/StringLuan.java Mon Aug 24 02:17:46 2015 -0600 @@ -148,6 +148,7 @@ } @LuanMethod public static Object[] gsub(LuanState luan,String s,String pattern,Object repl,Integer n) throws LuanException { + Utils.checkNotNull(luan,s); int max = n==null ? Integer.MAX_VALUE : n; final Matcher m = Pattern.compile(pattern).matcher(s); if( repl instanceof String ) {