magicbookproject / magicbook

The magic book project returns!
MIT License
1.07k stars 59 forks source link

image files are not found on Windows #29

Closed AntonioGHub closed 4 years ago

AntonioGHub commented 5 years ago

When images are stored in subfolders, on Windows the build returns messages like:

image not found in source folder: chapter10/ch10_exc05.png

This is happening when I try to build the book The Nature of Code 2.

I found that the problems stems to having the source attribute correctly set as:

src="chapter10/ch10_exc05.png"

but incorrectly matched against the ImageMap which stores the same entry using a similar but different key (with backslash)

chapter10\ch10_exc05.png

Shortly I'll propose a PR shortly to fix the issue.

mda2894 commented 4 years ago

I just wanted to bump this, because I'm running into the same problem trying to build NoC 2 on Windows. If there are fixes in the pipeline or whatnot, that's fine. I just wanted to check on the status of this issue and its corresponding PR.

runemadsen commented 4 years ago

I don't own a Windows machine, so I would need help fixing this bug by someone who has it.

AntonioGHub commented 4 years ago

I raised this issue (I own a Windows machine) and wrote a fix. You can find the PR here https://github.com/magicbookproject/magicbook/pull/30 and merge into master if it makes sense to you.

runemadsen commented 4 years ago

Ah, sorry about this. I'll merge and republish now.

AntonioGHub commented 4 years ago

ok thanks!