-
Notifications
You must be signed in to change notification settings - Fork 112
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
proposal: Support no indentation option in func (Subtitles) WriteToTTML #116
Comments
min0625
pushed a commit
to min0625/asticode-go-astisub
that referenced
this issue
Oct 5, 2024
Good idea! 👍 However I'd rather not have an additional
// Create write options
wo := &WriteToTTMLOptions{Indent: " "}
for _, opt := range opts {
opt(wo)
}
func WriteToTTMLWithIndentOption(indent string) WriteToTTMLOption {
return func(o *WriteToTTMLOptions) {
o.Indent = indent
}
} and use |
LGTM. I will adjust the PR later. |
min0625
pushed a commit
to min0625/asticode-go-astisub
that referenced
this issue
Oct 6, 2024
asticode
pushed a commit
that referenced
this issue
Oct 7, 2024
* feat: Issues-116 support options for WriteToTTML Issue: #116 * chore: rename TestTTMLWithOptionsNoIndent to TestWriteToTTMLWithIndentOption link: #117 (comment) * chore: use ./testdata/example-in.ttml link: #117 (comment) --------- Co-authored-by: Min <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
I noticed that the
WriteToTTML
function always indents the output. This is not a problem in most cases, but in some cases, storage space is limited, you may not want indentation.Proposal
I propose that:
WriteToTTMLWithOptions
inSubtitles
.TTMLWriteOptions
forWriteToTTMLWithOptions
.Define the following:
The text was updated successfully, but these errors were encountered: