Mercurial > hg > tema
changeset 29:2c6edd9cf677
Effective escaped newline matching.
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Thu, 14 May 2009 18:55:32 +0400 |
parents | fedd0147cb6f |
children | 54539dff18ca |
files | src/kryshen/tema/TemplateParser.java |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/src/kryshen/tema/TemplateParser.java Thu May 14 18:17:54 2009 +0400 1.2 +++ b/src/kryshen/tema/TemplateParser.java Thu May 14 18:55:32 2009 +0400 1.3 @@ -38,6 +38,11 @@ 1.4 1.5 public static final String ESCAPE_NEWLINE = "\\"; 1.6 public static final String ESCAPE_WHITESPACE = "\\\\"; 1.7 + 1.8 + private static final String[] ESCAPE_NEWLINE_COMBINED = { 1.9 + ESCAPE_NEWLINE + "\r\n", 1.10 + ESCAPE_NEWLINE + "\r", 1.11 + ESCAPE_NEWLINE + "\n"}; 1.12 1.13 /* Separators. */ 1.14 public static final char[] INVOKE_DATA_SEPARATORS = {':'}; 1.15 @@ -322,11 +327,7 @@ 1.16 return; 1.17 } 1.18 1.19 - matchInput(in, 1.20 - new String[] { 1.21 - ESCAPE_NEWLINE + "\r\n", 1.22 - ESCAPE_NEWLINE + "\r", 1.23 - ESCAPE_NEWLINE + "\n"}); 1.24 + matchInput(in, ESCAPE_NEWLINE_COMBINED); 1.25 } 1.26 1.27 boolean isSeparator(int c, char[] separators) {