X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FBasicSupport.java;h=0de0c4aa1eae107550b3266ed23820d558d830b9;hb=f60df2f146dbb998da84728f76903ecae9ed5f0a;hp=c0419aa46c4c2d61986f2742cb3099fbcbab3840;hpb=f0608ab10e762c1aed9608720b97c1901b5e2614;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/supported/BasicSupport.java b/src/be/nikiroo/fanfix/supported/BasicSupport.java index c0419aa..0de0c4a 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(); } // @@ -1496,7 +1497,8 @@ public abstract class BasicSupport { * @param in * the input * @param key - * the key to match + * the key to match (also supports "^" at start to say + * "only if it starts with" the key) * @param subKey * the sub key or NULL if none * @param endKey