Commit efd5265e by Peter Bennett

text: Fix handling of unbreakable-space in ssa subtitles

The character sequence \h is used for "unbreakable space".
Replace these sequences with space to avoid strings of \h
showing up on screen.
parent 744c57c8
......@@ -264,7 +264,8 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
String text =
SsaStyle.Overrides.stripStyleOverrides(rawText)
.replaceAll("\\\\N", "\n")
.replaceAll("\\\\n", "\n");
.replaceAll("\\\\n", "\n")
.replaceAll("\\\\h", " ");
Cue cue = createCue(text, style, styleOverrides, screenWidth, screenHeight);
int startTimeIndex = addCuePlacerholderByTime(startTimeUs, cueTimesUs, cues);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment