unplugin / unplugin-vue2-script-setup

💡 Bring `<script setup>` to Vue 2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

无法匹配script标签中换行的setup

zyqq opened this issue · comments

commented

Describe the bug

正常不换行能匹配
测试正则不换行
换行了就匹配不到
测试正则换行
这是换行的代码(eslint修复的时候自动换行的)

<script 
  setup 
  lang="ts"
>

Reproduction

https://tool.oschina.net/regex/

System Info

System:
    OS: macOS 13.3.1
    CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
    Memory: 123.28 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.13.1 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 114.0.5735.106
    Firefox: 85.0
    Safari: 16.4

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.