Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmel committed Sep 13, 2023
1 parent bf2ff3f commit 55b8664
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { parsers } = require("prettier/parser-html");

const regex =
/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|<title\s*>.*?<\/title|<textarea\s*>.*?<\/textarea|(<%([^>]*?)%>)/gs;
/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|<title.*?>.*?<\/title>|<textarea.*?>.*?<\/textarea>|(<%([^>]*?)%>)/gs;

const replacer = (m, t, c) => (!t ? m : `<!${c}!>`);

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
50 changes: 50 additions & 0 deletions test-textarea.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<%- include("../_partials/page-begin.html", page = { category: "Samples", title: "Presentation with three teasers", leftHandMenu: false, grid: true }) %>

<any-code-editor class="borderless">
<textarea name="any-code-editor">
<div class="row">
<div class="offset-md-1 col-xs-12 margin-bottom-1">
<h3 class="d3 text-align-center-sm-down">Future ready.<br>With.</h3>
</div>
</div>
<div class="row">
<div class="col-md-7 flex-md-top margin-bottom-2">
<div style="padding-top: 16%" class="hidden-sm-down"><!-- push down by half a small image height --></div>
<any-teaser
label="Good for the environment." label-aria-level="3"
image-src="/img/design/cards/solar-panel.jpg" image-alt="Solar panel"
href="javascript:;" href-label="Read more">
We aim to be climate neutral and achieve a positive CO2 contribution by 2025.
</any-teaser>
</div>
<div class="offset-lg-1 col-md-5 col-lg-4">
<div class="row margin-xs-bottom-2 margin-lg-bottom-3">
<div class="col-md-10 col-lg-9">
<any-teaser
label="Good for people" label-aria-level="3"
image-src="/img/design/cards/kids-at-school.jpg" image-alt="Kids at school"
href="javascript:;" href-label="Read more">
We are committed to inspiring workplaces, digital literacy and diversity.
</any-teaser>
</div>
<div class="col-md-2 col-lg-3"><!-- empty col on the right --></div>
</div>
<div class="padding-lg-4"><!-- vertical spacer --></div>
<div class="row margin-bottom-2">
<div class="col-md-2 col-lg-3"><!-- empty col on the left --></div>
<div class="col-md-10 col-lg-9">
<any-teaser
label="Responsible action" label-aria-level="3"
image-src="/img/design/cards/technical-specialists.jpg" image-alt="Team technical specialist"
href="javascript:;" href-label="Read more">
We work according to ethical principles and advocate fair supply chains.
</any-teaser>
</div>
</div>
</div>
</div>
<%- include("../_partials/teaser-animation.html", { page }) %>
</textarea>
</any-code-editor>

<%- include("../_partials/page-end.html", { page }) %>
2 changes: 1 addition & 1 deletion test.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title><!= text !></title>
<title><%= text %></title>
</head>
<body>
<div>
Expand Down

0 comments on commit 55b8664

Please sign in to comment.