win7killer/vue-format

Formatting fails from the point a regex pattern is present in the Vuejs code

kishankarun opened this issue · 1 comments

Describe the bug [描述]
Formatting fails from the point a regex pattern is present in the Vuejs code file

To Reproduce[复现]
Steps to reproduce the behavior:

  1. Add the following code in the .vue file in the methods section
    `
    isUrlValid(link, pattern) {
    var expression = "/^(?:http(s)?://)?[\w.-]+(?:.[\w.-]+)+[\w-._~:/?#[]@!$&'()*+,;=.]+$/g";

},
`
2. Format the file (using the shortcut key Ctrl+Alt+P)

Expected behavior[预期]
From that line where the regex expression is present, the formatting fails and appends the script part once again

Screenshots[截图]
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):[环境]

  • OS: Windows
  • Visual Studio Code
  • Version: 0.1.8

Additional context[补充]
None

No updates for this issue?