-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix duplicate tags when decoding MPL2 #68
Conversation
Nice to see someone look at the code, those markup conversions are not from the simplest or clearest end. Why do you suggest to leave the duplicate tag as part of the text? Wouldn't it make more sense to remove the duplicates, something like |
That was actually my first thought. But then what if you want to display one of the tags as text in the beginning of the line? You would need to offset with space. So its up to you, I can revert and just remove the duplicate tags. Dont know if there is any MPL2 docs as I cant find any, maybe its described there. |
I think those characters have been chosen for markup specifically because no meaningful text begins with "\", "/" or "_". I think we can assume those duplicates are markup errors, not in any part intended. So, yes, please change the code to remove duplicate tags, that should be a single line change to the existing code, and update the unit test. For docs, see below, not that it helps much. http://web.archive.org/web/20090328040233/http://napisy.ussbrowarek.org/mpl2-eng.html |
Done. I tried digging more info on MPL2 but could not find anything more than in your link. I also checked out how some players like mphc parse MPL2 and could not find bold/underline tags mentioned anywhere, so I dont know how they ended up here. |
Thanks, looks good to me! |
I can't find the source anymore, but my recollection is that there was a longer Polish-language documentation that included those bold and underline and I have followed that documentation. I don't remember how official that was. From there I have also taken the option to use MicroDVD markup with MPL2. |
MPL2:
Internal markup (before):
Internal markup (after):