diff --git a/index.js b/index.js index 546180d..ead1f20 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const { parsers } = require("prettier/parser-html"); const regex = - /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|.*?<\/title|.*?<\/textarea|(<%([^>]*?)%>)/gs; + /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|.*?<\/title>|.*?<\/textarea>|(<%([^>]*?)%>)/gs; const replacer = (m, t, c) => (!t ? m : ``); diff --git a/package-lock.json b/package-lock.json index d4ae1a5..30758e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "prettier-plugin-ejs", - "version": "0.0.16", + "version": "0.0.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "prettier-plugin-ejs", - "version": "0.0.16", + "version": "0.0.17", "license": "MIT", "devDependencies": { "prettier": "^2.8.8" diff --git a/package.json b/package.json index 96cc8cf..e20da52 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "prettier-plugin-ejs", "displayName": "Prettier EJS Plugin", - "version": "0.0.16", + "version": "0.0.17", "description": "A Prettier plugin for Embedded JavaScript Templating (EJS).", "keywords": [ "prettier", diff --git a/test-textarea.html b/test-textarea.html new file mode 100644 index 0000000..c8ccb65 --- /dev/null +++ b/test-textarea.html @@ -0,0 +1,50 @@ +<%- include("../_partials/page-begin.html", page = { category: "Samples", title: "Presentation with three teasers", leftHandMenu: false, grid: true }) %> + + + + + +<%- include("../_partials/page-end.html", { page }) %> diff --git a/test.html b/test.html index 90db8a0..38b7df1 100644 --- a/test.html +++ b/test.html @@ -1,7 +1,7 @@ - <!= text !> + <%= text %>