From 630202532d931487fab6c8c892cd53bc6a23f59a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Leuth=C3=A4user?= <1417198+max-leuthaeuser@users.noreply.github.com> Date: Tue, 5 Dec 2023 08:43:23 +0100 Subject: [PATCH] Vue parsing fix --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 01d4473..6b40421 100644 --- a/index.js +++ b/index.js @@ -156,8 +156,8 @@ const codeToJsAst = (code) => { const vueCleaningRegex = /<\/*script.*>||<\/*br>/ig; const vueTemplateRegex = /()([\s\S]*)(<\/template>)/ig; const vueCommentRegex = /<\!--[\s\S]*?-->/ig; -const vueBindRegex = /(:\[)([\s\S]*?)(\])/ig; -const vuePropRegex = /\s([.:@])([\s\S]*?=)/ig; +const vueBindRegex = /(:\[)([\S]*?)(\])/ig; +const vuePropRegex = /\s([.:@])([\S]*?=)/ig; /** * Convert a single vue file to AST diff --git a/package.json b/package.json index 774a7b6..ab13d10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@joernio/astgen", - "version": "3.9.0", + "version": "3.10.0", "description": "Generate JS/TS AST in json format with Babel", "exports": "./index.js", "keywords": [