Commit 77d125b2 by ibaker Committed by Oliver Woodman

Use replace() instead of replaceAll() in SsaDecoder

We're not using regex so there's no need to use replaceAll()

PiperOrigin-RevId: 332865724
parent dc242743
......@@ -263,9 +263,9 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
SsaStyle.Overrides styleOverrides = SsaStyle.Overrides.parseFromDialogue(rawText);
String text =
SsaStyle.Overrides.stripStyleOverrides(rawText)
.replaceAll("\\\\N", "\n")
.replaceAll("\\\\n", "\n")
.replaceAll("\\\\h", "\u00A0");
.replace("\\N", "\n")
.replace("\\n", "\n")
.replace("\\h", "\u00A0");
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