🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

prettier-plugin-templ-script

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-templ-script - npm Package Compare versions

Comparing version

to
0.0.6

5

index.js

@@ -22,3 +22,3 @@ import prettier from 'prettier';

const { text } = path.getValue();
const scriptRegex = /^(\s*)<script([\s\S]*?)>\n([\s\S]*?)<\/script>/gm;
const scriptRegex = /^(\s*)<script([\s\S]*?)>(\n([\s\S]*?))?<\/script>/gm;
const matches = text.matchAll(scriptRegex);

@@ -32,5 +32,6 @@ let transformedText = text;

scriptAttributes,
_,
scriptContent,
] of matches) {
if (!scriptContent.trim()) {
if (!scriptContent?.trim()) {
continue;

@@ -37,0 +38,0 @@ }

2

package.json
{
"name": "prettier-plugin-templ-script",
"version": "0.0.5",
"version": "0.0.6",
"description": "Prettier plugin for `<script>` elements in templ.",

@@ -5,0 +5,0 @@ "repository": {