Skip to content

support for urlencoded localpath? #119

@Cl4ySmith

Description

@Cl4ySmith

In the markdown file, the image local path is like:

![图片.png](HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b4f2e.png)

This path can be URL decoded according to UTF-8 encoding to get the correct path to the local file, as shown below:
image

But it ran with the following error message:

D:\Tool\crowbook.exe my.book
🐦 CROWBOOK 📚 0.16.0
✔ Finished
❌ pdf: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b
❌ epub: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0⚠️ WARNING Crowbook exited successfully, but the following errors occurred:
💣 ERROR Error rendering pdf: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b4f2e.png' for image
⚠️ WARNING Could not run zip command, falling back to zip library
💣 ERROR Error rendering epub: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b4f2e.png' for image

My guess is that crowbook cannot parse URL encoded local file paths.

Thank you for the great work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions