nlbdev / nordic-epub3-dtbook-migrator

Tools for converting between a strict subset of DTBook and EPUB3.
http://nlbdev.github.io/nordic-epub3-dtbook-migrator/
GNU Lesser General Public License v2.1
8 stars 7 forks source link

Fixing the time parsing issues, and adding the epubcheck error code information. #557

Closed kalaspuffar closed 1 year ago

kalaspuffar commented 1 year ago

Hi @josteinaj

I realized that we didn't add the information on the severity and error ID from the EPUBCheck report, which might be good to have for searchability. So that is one of the small changes in this PR.

The other one is more severe. The original time parsing code was written in PHP, which is not greedy in their regular expressions. So in this PR, I added the test case we had in PHP and fixed the hour/minute parsing code to handle greedy regular expressions correctly.

Best regards Daniel