Skip to content

Commit 00e2afa

Browse files
committed
fix parsing without whitespace
1 parent a5e1c7d commit 00e2afa

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/JsonLD/Core/RDFDatasetUtils.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,19 +561,16 @@ private class Regex
561561
public static readonly Pattern Literal = Pattern.Compile("(?:" + Plain + "(?:" +
562562
Datatype + "|" + Language + ")?)");
563563

564-
public static readonly Pattern Ws = Pattern.Compile("[ \\t]+");
565-
566564
public static readonly Pattern Wso = Pattern.Compile("[ \\t]*");
567565

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

570568
public static readonly Pattern EmptyOrComment = Pattern.Compile("^" + Wso + "(#.*)?$");
571569

572570
public static readonly Pattern Subject = Pattern.Compile("(?:" + Iri + "|" + Bnode
573-
+ ")" + Ws);
571+
+ ")" + Wso);
574572

575-
public static readonly Pattern Property = Pattern.Compile(Iri.GetPattern() + Ws.GetPattern
576-
());
573+
public static readonly Pattern Property = Pattern.Compile(Iri.GetPattern() + Wso);
577574

578575
public static readonly Pattern Object = Pattern.Compile("(?:" + Iri + "|" + Bnode
579576
+ "|" + Literal + ")" + Wso);

tests/JsonLD.Test/NQuadsParserTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Diagnostics;
34
using System.IO;
45
using System.Linq;
56
using JsonLD.Core;

0 commit comments

Comments
 (0)