-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown images break the plugin invoking errors #115
Comments
According to the path ' |
Agree. |
Sure, I've created a new branch in our project to reproduce the issue. It can be found here. The repository is a few GBs, I've just removed everything else and kept the MDBook, so you could use the Download button from the hamburger menu. Inside the book.toml if we comment the following config everything works as expected: # Disabling this line everything works as expected
[output.epub] But, here's the error:
If I remove the following lines from this file with the mdbook-epub backend enabled, everything works: ![FXRMotionControllerData Blueprint representation](fxrmotioncontrollerdata-blueprint-representation.png "FXRMotionControllerData Blueprint representation")
![Get a joint position and rotation from FXRMotionControllerData in Blueprint](fxrmotioncontrollerdata-blueprint-get-joint-position-rotation.png "Get a joint position and rotation from FXRMotionControllerData in Blueprint") As suggested by the mdbook example in their own book we keep images at the same level as the .md file since easier to address. But, for example if we move the assets to /assets/ and try to link with absolute paths it breaks the mdbook-pdf backend with images not showing up, but the PDF generation works there. I hope that helps demonstrate the issue. |
Thanks a lot @NuLL3rr0r !
That disables mdbook-epub completely, only mdbook works in this case.
Thank you. That is most interested case. |
Yes, I meant disabling the epub backend makes everything else work (HTML, PDF backends generate their expected output) when there are markdown images inside the project. Sorry, if my wording was not clear. Thank you for taking caring of the issue! |
What's the version of mdbook-epub you using? Download and build with code of master branch or 0.4.37 tag are both working. There is no |
Well, I've just made the following change in our GNUmakefile
And it seems v0.4.40:
|
And, I've just realized crates.io has version v4.40.0 while I cannot find this tag on the repo. I feel a bit confused. |
OK, even tried this for the latest commit on the master branch:
|
Default link preprocessor will rename I strongly suggest use filename other than "README.md" that is special to link preprocessor causing this kind of issue. And we should explicitly tell user this situation when using |
Well, that's what the mdbook source themselves are doing. For every folder they have a REAMDE.md treated as index.html. |
Before a fix landed, downgrade to 0.4.27 to workaround this for now to produce a valid epub for reading.
Look deep into it, something happened when refactoring before. Even build pass, the image is embed to wrong path and not visible when reading ePub file. This bug is introduced in commit and error only occurs when running as a preprocessor and links preprocessor enabled. The issue, image is not found when reading, is happened whether how the book is built. |
For example:
Produces:
This however works fine with the HTML backend as intended.
The text was updated successfully, but these errors were encountered: