Skip to content

Image Sourcing Bug #48

Open
Open

Description

@touhid-rahman

It's putting a "" sign before which is not needed and so image source is not working.

It should be:
<img src="img/logo _2.png"

It is giving:
<img src="/img/logo _2.png"
http://prntscr.com/hs6pa6

Please suggest ways so I can fix this; thanks!

Activity

  1. sagold commented on Jan 1, 2018

    @sagold
    Owner

    Hi touhid-rahman.

    Absolute filepaths have a leading slash per default. The most straightforward is to add an regex (replace_on_insert) to your custom trigger, like the following

    {
        "scope": "text\\.html",
        "prefix": ["src", "url"],
    
        "auto": true,
        "base_directory": true,
        "extensions": ["js", "png", "gif", "jpeg", "jpg", "svg"],
        "relative": true,
        "replace_on_insert": [
        	["^\\\/", ""]
        ]
    }

    If you have not yet added the rules to your custom settings, i suggest you copy your required triggers to your FuzzyFilePath UserSettings and modify the corresponding config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions