Skip to content

Commit 8b8ee7e

Browse files
committed
fix 1 - treat comment lines as empty lines
1 parent 631257f commit 8b8ee7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/JsonLD/Core/RDFDatasetUtils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ private class Regex
567567

568568
public static readonly Pattern Eoln = Pattern.Compile("(?:\r\n)|(?:\n)|(?:\r)");
569569

570-
public static readonly Pattern Empty = Pattern.Compile("^" + Wso + "$");
570+
public static readonly Pattern EmptyOrComment = Pattern.Compile("^" + Wso + "(#.*)?$");
571571

572572
public static readonly Pattern Subject = Pattern.Compile("(?:" + Iri + "|" + Bnode
573573
+ ")" + Ws);
@@ -606,7 +606,7 @@ public static RDFDataset ParseNQuads(string input)
606606
{
607607
lineNumber++;
608608
// skip empty lines
609-
if (RDFDatasetUtils.Regex.Empty.Matcher(line).Matches())
609+
if (RDFDatasetUtils.Regex.EmptyOrComment.Matcher(line).Matches())
610610
{
611611
continue;
612612
}

0 commit comments

Comments
 (0)