telesoho / vscode-markdown-paste-image

Smartly paste for Markdown.
MIT License
135 stars 41 forks source link

Paste Path add `./` and File name verification support for Chinese #18

Closed revolveyao closed 5 years ago

revolveyao commented 6 years ago

There are times when you need to paste the path with ./.To change it with ./. The file name may be in Chinese at some point.It is recommended that you change the regular expression that determines the file name's legitimacy.

if (selectText && !/^[^\\/:\*\?""<>|]{1,120}$/.test(selectText)) {
            vscode.window.showInformationMessage('Your selection is not a valid file name!');
            return;
        }
telesoho commented 6 years ago

Thank you. I have fixed it.