ChiriVulpes / MagicTranslator

Turning scanlation into a magical experience ✨
4 stars 1 forks source link

Importing dialogue md fails if chapter pages start from anything other than 1 #166

Open nikitalita opened 8 months ago

nikitalita commented 8 months ago

Consider an exported dialog like this:

image

import() extracts the literal page numbers like so:

image

The problem is that the literal number (-1) gets used as an index into the chapter pages, which starts from 0:

image image

So, the page being extracted ends up as NaN, and we end up with this:

image

Not quite sure how to fix this.