Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update syntax.md #606

Merged
merged 1 commit into from Jun 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions docs/syntax.md
Expand Up @@ -21,7 +21,6 @@ Table of contents
- `_%>`: Removes all trailing whitespace
- Literal tags
- Including other files
- “Preprocessor” directive
- JavaScript `include()` function
- Copyright

Expand Down Expand Up @@ -439,18 +438,6 @@ template.
The behavior of resolving included file path can be overridden using the
`ejs.resolveInclude` function.

### “Preprocessor” directive

As a compatibility layer with EJS version 1, it is possible to use the
`include` directive in an unescaped output tag to directly “yank” the
text from another file, just like including a C header. However, as it is done
as a simple inclusion, you cannot pass arguments to the included template. You
can however make variables available in the parent template, that will be
visible to the child template as well.

This flavor of `include` is **static**, which means that the resulting
function contains the copy of the included file as when it was compiled, so
if you changed the file after compilation, the changes are not reflected.

#### Whitespace control

Expand Down