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 issue where books are longer than 99 hours. #573

Closed kalaspuffar closed 1 month ago

kalaspuffar commented 1 month ago

Hi @josteinaj

We just received an error in a book with 120 hours of Economic forecasts. The regular expression only supported two numbers in the hour's value. I've raised this to three numbers, so hopefully, we never see a book with 1k hours.

Best regards Daniel

kalaspuffar commented 1 month ago

Looks good. Do you think we could do a \d+ to avoid having an upper limit? Or could there be issues with that?

We could do that, but I remember that the search could be really slow when you do backward lookups, so I think this solution is safer and probably more performant. It was a while ago that I read up on this, so there might have been changes since then.

Best regards Daniel