git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
379a497
)
update from master
subtree
author
Niki Roo
<niki@nikiroo.be>
Tue, 26 May 2020 19:36:10 +0000
(21:36 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Tue, 26 May 2020 19:36:10 +0000
(21:36 +0200)
supported/Text.java
patch
|
blob
|
blame
|
history
diff --git
a/supported/Text.java
b/supported/Text.java
index 252aca0443fbfe0f71db294c0c8c1d3a816deb72..45d970a656322ef8e312f7cd6950a83123aedfe7 100644
(file)
--- a/
supported/Text.java
+++ b/
supported/Text.java
@@
-227,9
+227,12
@@
class Text extends BasicSupport {
@SuppressWarnings("resource") // cannot close, or we loose getInput()!
Scanner scan = new Scanner(getInput(), "UTF-8");
scan.useDelimiter("\\n");
@SuppressWarnings("resource") // cannot close, or we loose getInput()!
Scanner scan = new Scanner(getInput(), "UTF-8");
scan.useDelimiter("\\n");
- scan.next(); // title
- scan.next(); // author
- scan.next(); // date or empty
+ if (scan.hasNext())
+ scan.next(); // title
+ if (scan.hasNext())
+ scan.next(); // author
+ if (scan.hasNext())
+ scan.next(); // date or empty
Boolean inChap = null;
String line = "";
while (scan.hasNext()) {
Boolean inChap = null;
String line = "";
while (scan.hasNext()) {