Skip to content

Commit

Permalink
Merge pull request #8 from DSRCorporation/bugfix/ttml-export
Browse files Browse the repository at this point in the history
Bugfix/ttml-export
  • Loading branch information
pavel-belenko authored Feb 7, 2017
2 parents ccb90cf + 96e86b3 commit e64af5f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libse/SubtitleFormats/TimedText10.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,13 @@ private static void ConvertParagraphNodeToTTMLNode(XmlNode node, XmlDocument ttm
{
ttmlNode.AppendChild(ttmlXml.CreateTextNode(child.Value));
}
else if (child.Name == "br")
{
XmlNode br = ttmlXml.CreateElement("br");
ttmlNode.AppendChild(br);

ConvertParagraphNodeToTTMLNode(child, ttmlXml, br);
}
else if (child.Name == "i")
{
XmlNode span = ttmlXml.CreateElement("span");
Expand Down Expand Up @@ -427,7 +434,7 @@ private static void ConvertParagraphNodeToTTMLNode(XmlNode node, XmlDocument ttm

if (child.Attributes["color"] != null)
{
XmlAttribute attr = ttmlXml.CreateAttribute("tts:color", "http://www.w3.org/ns/10/ttml#style");
XmlAttribute attr = ttmlXml.CreateAttribute("tts:color", TTMLStylingNamespace);
attr.InnerText = child.Attributes["color"].Value;
span.Attributes.Append(attr);
}
Expand Down

0 comments on commit e64af5f

Please sign in to comment.