From: David ‘Bombe’ Roden Date: Wed, 8 Dec 2010 05:40:21 +0000 (+0100) Subject: Recognize a line break as whitespace, too. X-Git-Tag: 0.3.2~7 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6f6f3625d46179c3b4ab04cb3bd151d45e4546d5;p=Sone.git Recognize a line break as whitespace, too. --- diff --git a/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java b/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java index 906571b..4751ed5 100644 --- a/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java +++ b/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java @@ -40,7 +40,7 @@ public class FreenetLinkParser implements Parser { private static final Logger logger = Logging.getLogger(FreenetLinkParser.class); /** Pattern to detect whitespace. */ - private static final Pattern whitespacePattern = Pattern.compile("[\u0020\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u200c\u200d\u202f\u205f\u2060\u2800\u3000]"); + private static final Pattern whitespacePattern = Pattern.compile("[\\u000a\u0020\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u200c\u200d\u202f\u205f\u2060\u2800\u3000]"); /** * Enumeration for all recognized link types.