projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use provider interfaces for the parser; enhance test case.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
text
/
SoneTextParser.java
diff --git
a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
index
2787d52
..
94c3db4
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
+++ b/
src/main/java/net/pterodactylus/sone/text/SoneTextParser.java
@@
-225,7
+225,9
@@
public class SoneTextParser implements Parser<SoneTextParserContext> {
if (!lastLineEmpty && lineComplete) {
parts.add(new PlainTextPart("\n" + line.substring(0, next)));
} else {
if (!lastLineEmpty && lineComplete) {
parts.add(new PlainTextPart("\n" + line.substring(0, next)));
} else {
- parts.add(new PlainTextPart(line.substring(0, next)));
+ if (next > 0) {
+ parts.add(new PlainTextPart(line.substring(0, next)));
+ }
}
String link = line.substring(next, nextSpace);
String name = link;
}
String link = line.substring(next, nextSpace);
String name = link;