From: Niki Roo Date: Tue, 25 Apr 2017 19:19:28 +0000 (+0200) Subject: Fix: "Chapter 5: - Fun!" -> "Chapter 5: Fun!" X-Git-Tag: fanfix-swing-0.0.1~12^2~469 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=f60df2f146dbb998da84728f76903ecae9ed5f0a;p=fanfix-swing.git Fix: "Chapter 5: - Fun!" -> "Chapter 5: Fun!" --- diff --git a/src/be/nikiroo/fanfix/supported/BasicSupport.java b/src/be/nikiroo/fanfix/supported/BasicSupport.java index 471147ea..0de0c4aa 100644 --- a/src/be/nikiroo/fanfix/supported/BasicSupport.java +++ b/src/be/nikiroo/fanfix/supported/BasicSupport.java @@ -593,7 +593,8 @@ public abstract class BasicSupport { protected Chapter makeChapter(URL source, int number, String name, String content, Progress pg) throws IOException { // Chapter name: process it correctly, then remove the possible - // redundant "Chapter x: " in front of it + // redundant "Chapter x: " in front of it, or "-" (as in + // "Chapter 5: - Fun!" after the ": " was automatically added) String chapterName = processPara(name).getContent().trim(); for (String lang : Instance.getConfig().getString(Config.CHAPTER) .split(",")) { @@ -611,7 +612,7 @@ public abstract class BasicSupport { Integer.toString(number).length()).trim(); } - if (chapterName.startsWith(":")) { + while (chapterName.startsWith(":") || chapterName.startsWith("-")) { chapterName = chapterName.substring(1).trim(); } //