mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
change newline value
This commit is contained in:
parent
d92936187d
commit
0cb3c39636
@ -48,7 +48,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
}
|
}
|
||||||
multiline.Add(line);
|
multiline.Add(line);
|
||||||
}
|
}
|
||||||
subEvent.Text = string.Join(@"\N", multiline);
|
subEvent.Text = string.Join(@"\n", multiline);
|
||||||
subEvent.Text = Regex.Replace(subEvent.Text, @"\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}", string.Empty, RegexOptions.IgnoreCase);
|
subEvent.Text = Regex.Replace(subEvent.Text, @"\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}", string.Empty, RegexOptions.IgnoreCase);
|
||||||
subEvent.Text = Regex.Replace(subEvent.Text, "<", "<", RegexOptions.IgnoreCase);
|
subEvent.Text = Regex.Replace(subEvent.Text, "<", "<", RegexOptions.IgnoreCase);
|
||||||
subEvent.Text = Regex.Replace(subEvent.Text, ">", ">", RegexOptions.IgnoreCase);
|
subEvent.Text = Regex.Replace(subEvent.Text, ">", ">", RegexOptions.IgnoreCase);
|
||||||
|
@ -25,7 +25,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
var text = trackEvent.Text;
|
var text = trackEvent.Text;
|
||||||
|
|
||||||
// TODO: Not sure how to handle these
|
// TODO: Not sure how to handle these
|
||||||
text = Regex.Replace(text, @"\\N", " ", RegexOptions.IgnoreCase);
|
text = Regex.Replace(text, @"\\n", " ", RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
writer.WriteLine(text);
|
writer.WriteLine(text);
|
||||||
writer.WriteLine(string.Empty);
|
writer.WriteLine(string.Empty);
|
||||||
|
@ -147,7 +147,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
|
|
||||||
public static string GetFormattedText(string text)
|
public static string GetFormattedText(string text)
|
||||||
{
|
{
|
||||||
text = text.Replace("\\N", Environment.NewLine).Replace("\\n", Environment.NewLine);
|
text = text.Replace("\\n", Environment.NewLine).Replace("\\n", Environment.NewLine);
|
||||||
bool italic = false;
|
bool italic = false;
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) // just look ten times...
|
for (int i = 0; i < 10; i++) // just look ten times...
|
||||||
|
@ -34,7 +34,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
{
|
{
|
||||||
var text = trackEvent.Text;
|
var text = trackEvent.Text;
|
||||||
|
|
||||||
text = Regex.Replace(text, @"\\N", "<br/>", RegexOptions.IgnoreCase);
|
text = Regex.Replace(text, @"\\n", "<br/>", RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
writer.WriteLine("<p begin=\"{0}\" dur=\"{1}\">{2}</p>",
|
writer.WriteLine("<p begin=\"{0}\" dur=\"{1}\">{2}</p>",
|
||||||
trackEvent.StartPositionTicks,
|
trackEvent.StartPositionTicks,
|
||||||
|
@ -23,7 +23,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||||||
var text = trackEvent.Text;
|
var text = trackEvent.Text;
|
||||||
|
|
||||||
// TODO: Not sure how to handle these
|
// TODO: Not sure how to handle these
|
||||||
text = Regex.Replace(text, @"\\N", " ", RegexOptions.IgnoreCase);
|
text = Regex.Replace(text, @"\\n", " ", RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
writer.WriteLine(text);
|
writer.WriteLine(text);
|
||||||
writer.WriteLine(string.Empty);
|
writer.WriteLine(string.Empty);
|
||||||
|
Loading…
Reference in New Issue
Block a user