From 5d4656f9c5eea0ec7b8ff2636269cb86bf6f1239 Mon Sep 17 00:00:00 2001 From: ecmel Date: Mon, 7 Aug 2023 10:39:37 +0300 Subject: [PATCH] release --- README.md | 2 ++ index.js | 2 +- test.html | 18 +++++++++++++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index af8444d..44ee4f7 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ Please check [Prettier Docs](https://prettier.io/docs/en/plugins.html) for other
<%= 1 > 0 %>
+ <%= text %>
<%= text %>
@@ -60,6 +61,7 @@ Please check [Prettier Docs](https://prettier.io/docs/en/plugins.html) for other
<%= 1 > 0 %>
+ <%= text %>
<%= text %>
diff --git a/index.js b/index.js index ff943d8..a841c60 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const { parsers } = require("prettier/parser-html"); const regex = - /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|]*?)%>)/gs; + /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|<(?:title|textarea).*?<\/|(<%([^>]*?)%>)/gs; const replacer = (m, t, c) => (!t ? m : ``); diff --git a/test.html b/test.html index 24fa108..6214fdc 100644 --- a/test.html +++ b/test.html @@ -1,7 +1,7 @@ - + - <%= title %> + <%= text %>
@@ -17,10 +17,22 @@ %>
-
<%= 1 > 0 %>
+
<%= 1 > 0 %>
+ <%= text %>
<%= text %>
+ <%= text %> + + + + + + +
+ <%= text %> + <%= text %> + <%= text %>