Skip to content

Doesn't get image path/ fail to parse #31

@jtakesp

Description

@jtakesp

I just struggled with an issue and want to share:
If you add the image-link into a markdown-file with "%20" instead of spaces as some tools do, e.g. "" you will get a problem with inline-preview. In the function image-marker.js->parseImageLocation the path will be recognized as not absolute and the basepath and the markdown-link will be merged, which is great. However, if you set the basePath e.g. "C:Users/one user name/" the function getImagePath cannot resolve a combination of spaces and "%20". the exception just sets the local image path instead of adding the basePath at the beginning. As a result, if the basePath is modified in the settings, it just will be ignored.

Solution:
add "imagePath = imagePath.replace(/%20/g," ");" in the function image-marker.js->parseImageLocation.

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