dfxp2srt: do not translate '\n's to line breaks, only <br> and <p>
This commit is contained in:
parent
b062d94eef
commit
056c797523
@ -1865,7 +1865,7 @@ def dfxp2srt(dfxp_data):
|
|||||||
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
dfxp = xml.etree.ElementTree.fromstring(dfxp_data.encode('utf-8'))
|
dfxp = xml.etree.ElementTree.fromstring(dfxp_data.replace('\n','').encode('utf-8'))
|
||||||
out = []
|
out = []
|
||||||
paras = dfxp.findall(_x('.//ttml:p')) or dfxp.findall(_x('.//ttaf1:p')) or dfxp.findall('.//p')
|
paras = dfxp.findall(_x('.//ttml:p')) or dfxp.findall(_x('.//ttaf1:p')) or dfxp.findall('.//p')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user