codemetrics icon indicating copy to clipboard operation
codemetrics copied to clipboard

Cannot work under vue setup script

Open iceprosurface opened this issue 2 years ago • 2 comments

image image

iceprosurface avatar Sep 03 '22 09:09 iceprosurface

https://github.com/kisstkondoros/codemetrics/blob/master/src/metrics/server/MetricsParserUtil.ts#L31

Change /<script lang="js">/gim -> <script(\s*setup)? lang="js"(\s*setup)?>?

iceprosurface avatar Sep 03 '22 09:09 iceprosurface

<script( +setup)?( lang="(js|ts)")?( +setup)?>
image

I try this regex, it works very well.

image image image

iceprosurface avatar Sep 03 '22 09:09 iceprosurface

published with 1.25.2

kisstkondoros avatar Dec 20 '22 19:12 kisstkondoros