simple-yet-powerful-srt-subtitle-parser-cpp icon indicating copy to clipboard operation
simple-yet-powerful-srt-subtitle-parser-cpp copied to clipboard

Is it possible to get line break information from the subtitles?

Open Jonathhhan opened this issue 3 years ago • 3 comments

Thanks for the nice subtitle parser, it works very well with Open Frameworks. I wonder if it is possible to get line break information (\n), so that I can format the subtitles similar to the original...

Jonathhhan avatar Mar 24 '22 03:03 Jonathhhan

Actually I found a solution. I just had to replace:

                if (completeLine != "")
                    completeLine += " ";

with:

                if (completeLine != "")
                    completeLine += "\n";

Jonathhhan avatar Mar 25 '22 00:03 Jonathhhan

Would you like to send a PR? :)

saurabhshri avatar Mar 25 '22 03:03 saurabhshri

I did send a PR... :)

Jonathhhan avatar Mar 25 '22 13:03 Jonathhhan