Arnavion / libjass

Renders ASS subs in the browser.
Apache License 2.0
174 stars 29 forks source link

Soft line breaks breaking rendering of subititles #91

Closed joshuabrown-ellation closed 7 years ago

joshuabrown-ellation commented 7 years ago

In our application we sometimes get substation alpha authors that put the string literal "\n" at the end of dialogue in addition to the whitepace \n that demarcates the new line of dialogue in the .SSA file. Some also use it in place of the hard line break, so that results in "\n" in the middle of a line of dialogue being rendered.

Since the Aegisub spec doesn't prevent the use of the soft line break: http://docs.aegisub.org/3.2/ASS_Tags/#wrapstyle, we will add the literal "\n" to the tests for new line breaks in parse.ts

A lot of our developers use JetBrains products, so we added ".idea" to the .gitignore.

Arnavion commented 7 years ago

If you decide to resubmit this, make it a new Part class like SoftNewLine since the existing NewLine part only corresponds to hard line breaks. (Unfortunate naming. I don't remember why I named it like that.)