Skip to content

Commit 271f997

Browse files
committed
Adding checks for tab and formfeed as separators
1 parent 8db9d8b commit 271f997

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jprops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ def getJavaProperties(propfile):
2121
AttributeError: if invalid object was provided for file object
2222
Corresponds to java NullPointerException
2323
24-
Author: Kishan Thomas <kishan@hackorama.com>
24+
Author: Kishan Thomas <kishan.thomas@gmail.com> www.hackorama.com
2525
"""
2626
LINE_BREAKS = '\n\r\f' #end-of-line, carriage-return, form-feed
2727
ESC_DELIM = r'\\' # '\'
2828
ESCAPED_ESC_DELIM = r'\\\\' # '\\'
2929
COMMENT_LINE = re.compile('\s*[#!].*') # starts with #|! ignore white space
3030
MULTI_LINE = re.compile(r'.*[\\]\s*$') # ending with '\' ignore white space
31-
# non escaped =|:|' ', include surrounding non escaped white space
32-
SPLIT_DELIM = re.compile(r'(?<!\\)\s*(?<!\\)[=: ]\s*')
31+
# non escaped =|:|' '|tab|formfeed, include surrounding non escaped white space
32+
SPLIT_DELIM = re.compile(r'(?<!\\)\s*(?<!\\)[=: \t\f]\s*')
3333
# match escape characters '\', except escaped '\\' and unicode escape '\u'
3434
VALID_ESC_DELIM = r'(?<!\\)[\\](?!u)'
3535
DEFAULT_ELEMENT = ''

0 commit comments

Comments
 (0)