Skip to content

Commit c3ddb40

Browse files
committed
Fix parsing comments
1 parent e357ba9 commit c3ddb40

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/pyld/nquads.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def parse_nquads(input_: str):
4242
literal = '(?:' + plain + '(?:' + datatype + '|' + language + ')?)'
4343
ws = '[ \\t]+'
4444
wso = '[ \\t]*'
45-
empty = r'^' + wso + '$'
45+
comment = '^#.*$'
46+
empty = '(' + r'^' + wso + '$' + '|' + comment + ')'
4647

4748
# define quad part regexes
4849
subject = '(?:' + iri + '|' + bnode + ')' + ws

0 commit comments

Comments
 (0)