codemetrics
codemetrics copied to clipboard
Cannot work under vue setup script


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)?>
?
<script( +setup)?( lang="(js|ts)")?( +setup)?>

I try this regex, it works very well.



published with 1.25.2