Mercurial Hosting > luan
changeset 587:fa281ee942c8
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 24 Aug 2015 04:43:55 -0600 |
parents | a140be489a72 |
children | 5fdbefa80146 |
files | core/src/luan/impl/ThemeParser.java core/src/luan/modules/Time.luan |
diffstat | 2 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/core/src/luan/impl/ThemeParser.java Mon Aug 24 02:17:46 2015 -0600 +++ b/core/src/luan/impl/ThemeParser.java Mon Aug 24 04:43:55 2015 -0600 @@ -380,7 +380,7 @@ private static String parseName(Parser parser) { int start = parser.begin(); - if( !NameFirstChar(parser) ) + if( !NameChar(parser) ) return parser.failure(null); while( NameChar(parser) ); String match = parser.textFrom(start); @@ -388,11 +388,8 @@ } private static boolean NameChar(Parser parser) { - return NameFirstChar(parser) || parser.inCharRange('0', '9'); - } - - private static boolean NameFirstChar(Parser parser) { - return parser.inCharRange('a', 'z') || parser.inCharRange('A', 'Z') || parser.match('_'); + return parser.inCharRange('a', 'z') || parser.inCharRange('A', 'Z') + || parser.inCharRange('0', '9') || parser.anyOf("-_"); } }
--- a/core/src/luan/modules/Time.luan Mon Aug 24 02:17:46 2015 -0600 +++ b/core/src/luan/modules/Time.luan Mon Aug 24 04:43:55 2015 -0600 @@ -41,7 +41,7 @@ end function M.format(time,pattern) - pattern = pattern or "yyyy-MM-dd HH:m:ss" + pattern = pattern or "yyyy-MM-dd HH:mm:ss" return SimpleDateFormat.new(pattern).format(Date.new(time)) end