Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRT Writer: Handling of newlines when input content has @xml:space = "preserve" #350

Open
xchange11 opened this issue Oct 19, 2021 · 0 comments

Comments

@xchange11
Copy link
Collaborator

The following IMSC document input:

<ttml:tt xmlns:ttml="http://www.w3.org/ns/ttml"
    xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
    xmlns:tts="http://www.w3.org/ns/ttml#styling" xml:lang="de" ttp:cellResolution="44 29">
    <ttml:head>
        <ttml:layout>
            <ttml:region xml:id="r0" tts:displayAlign="after" tts:extent="90% 80%" tts:origin="5% 10%" />
        </ttml:layout>
    </ttml:head>
    <ttml:body>
        <ttml:div xml:space="preserve">
            <ttml:p region="r0" begin="00:00:01.160" end="00:00:03.160" tts:fontSize="160%" tts:lineHeight="125%" tts:textAlign="center" xml:space="preserve">
                
            Test whitespace handling
            
        </ttml:p>
        </ttml:div>
    </ttml:body>
</ttml:tt>

Results in the following (invalid) SRT output:

1
00:00:01,160 --> 00:00:03,160

            Test whitespace handling

The empty line between timing and subtitle content needs to be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants