1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 05:27:18 +08:00

[nrk] Remove whitespace in XML subtitles causing problems for .srt files

This commit is contained in:
Forthrin 2019-05-08 08:43:41 +02:00
parent 71ebd35d50
commit 3e1d4b969e
2 changed files with 2 additions and 2 deletions

View File

@ -1237,7 +1237,7 @@ part 3</font></u>
4 4
00:00:09,560 --> 00:00:12,359 00:00:09,560 --> 00:00:12,359
<i><u><font color="yellow"><font color="lime">inner <i><u><font color="yellow"><font color="lime">inner
</font>style</font></u></i> </font>style</font></u></i>
''' '''
self.assertEqual(dfxp2srt(dfxp_data_with_style), srt_data) self.assertEqual(dfxp2srt(dfxp_data_with_style), srt_data)

View File

@ -2831,7 +2831,7 @@ def dfxp2srt(dfxp_data):
self._applied_styles.pop() self._applied_styles.pop()
def data(self, data): def data(self, data):
self._out += data self._out += data.strip()
def close(self): def close(self):
return self._out.strip() return self._out.strip()