From b489b6cb57c56a4c03af76b3ce545b5823773073 Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Sun, 20 Oct 2019 13:15:00 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20Fix=C2=A0EJS=C2=A0code=C2=A0block=C2=A0?= =?UTF-8?q?language?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- docs/syntax.md | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1aff50c3..bfa4e2c1 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ call unless you are using `renderFile()`. You'll likely want to use the raw output tag (`<%-`) with your include to avoid double-escaping the HTML output. -```html +```ejs
Hello, <%= name %>.
Hello, <%= 'the Most Honorable ' + name %>.
``` @@ -97,7 +97,7 @@ cross-site scripting (XSS) attacks. ##### EJS -```html +```ejsHello, <%- myHtml %>.
Hello, <%= myHtml %>.
@@ -138,7 +138,7 @@ example below. You can trim it using the `-%>` ending tag. ##### EJS -```html +```ejsYay it's true!
@@ -196,7 +196,7 @@ It is not necessary to use curly brackets for scriptlet-only code. <% } %> ``` -```js +```ejs <%# These are all valid statements %> <% var output , exclamation = '' @@ -223,7 +223,7 @@ Line breaks are allowed in `<%` tags. Unless the statement involves mixing EJS and JavaScript scriptlet, always put complete statements in a tag. For example, the following works: -```js +```ejs <% var stringToShow = thisIsABooleanVariableWithAVeryLongName ? 'OK' : 'not OK' %> @@ -231,7 +231,7 @@ complete statements in a tag. For example, the following works: While the following does not: -```js +```ejs <% var stringToShow = thisIsABooleanVariableWithAVeryLongName %> <% ? 'OK' %> <% : 'not OK' %> @@ -258,7 +258,7 @@ It does *not* mean that we recommend mixing coding styles in your own project. ##### EJS -```html +```ejsThis is literal: <%%
This is literal too: <%% %>
This is literal as well: %%>@@ -461,13 +461,13 @@ directive, as it trims the whitespace after the included file. ##### included.ejs -```html +```ejs