diff --git a/midica.jar b/midica.jar index e3cfd03..70b5344 100644 Binary files a/midica.jar and b/midica.jar differ diff --git a/src/org/midica/Midica.java b/src/org/midica/Midica.java index 117efbb..0257888 100644 --- a/src/org/midica/Midica.java +++ b/src/org/midica/Midica.java @@ -33,13 +33,13 @@ public class Midica { * After switching to a new major version, this has to be set to "-1" manually, so that * precommit.pl starts with "0" again. */ - private static final int VERSION_MINOR = 6; + private static final int VERSION_MINOR = 7; /** UNIX timestamp of the last commit */ - public static final int COMMIT_TIME = 1691601094; + public static final int COMMIT_TIME = 1692861685; /** Branch name. Automatically changed by precommit.pl */ - public static final String BRANCH = "osx"; + public static final String BRANCH = "master"; /** Full version string. */ public static final String VERSION = VERSION_MAJOR + "." + VERSION_MIDDLE + "." + VERSION_MINOR + ("master".equals(BRANCH) ? "" : "-" + BRANCH); diff --git a/src/org/midica/file/write/MidicaPLExporter.java b/src/org/midica/file/write/MidicaPLExporter.java index b32b768..46af9e6 100644 --- a/src/org/midica/file/write/MidicaPLExporter.java +++ b/src/org/midica/file/write/MidicaPLExporter.java @@ -207,6 +207,8 @@ private void createMetaBlock() { HashMap metaInfo = (HashMap) sequenceInfo.get("meta_info"); HashMap karaokeInfo = KaraokeAnalyzer.getKaraokeInfo(); String copyright = (String) metaInfo.get("copyright"); + if (copyright != null) + copyright = copyright.replace("\n", "\\n").replace("\r", "\\r"); // TODO: support multiple lines in MidicaPL String[] fields = {"copyright", "title", "composer", "lyricist", "artist"}; String[] values = new String[5]; String[] mplIds = { @@ -286,8 +288,14 @@ private String createSoftKaraokeBlock(HashMap karaokeInfo) { // read value String value = (String) karaokeInfo.get(fields[i]); - if (null == value) + if (null == value) { continue; + } + else { + // Escaping \r and \n not allowed in soft karaoke. + // But newlines must be thrown out anyway. + value = value.replace("\n", " ").replace("\r", " "); + } // append the line block.append("\t\t" + String.format("%-12s", mplIds[i]) + " " + value + NEW_LINE);