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

(twig) update list of filter and tags #2090

Merged
merged 5 commits into from
Oct 25, 2019
Merged
Changes from 2 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
12 changes: 6 additions & 6 deletions src/languages/twig.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ function(hljs) {
var FILTER = {
begin: /\|[A-Za-z_]+:?/,
keywords:
'abs batch capitalize convert_encoding date date_modify default ' +
'escape first format join json_encode keys last length lower ' +
'merge nl2br number_format raw replace reverse round slice sort split ' +
'striptags title trim upper url_encode',
'abs batch capitalize column convert_encoding date date_modify default ' +
'escape filter first format inky_to_html inline_css join json_encode keys last ' +
'length lower map markdown merge nl2br number_format raw reduce replace ' +
'reverse round slice sort spaceless split striptags title trim upper url_encode',
contains: [
FUNCTIONS
]
};

var TAGS = 'autoescape block do embed extends filter flush for ' +
javiereguiluz marked this conversation as resolved.
Show resolved Hide resolved
'if import include macro sandbox set spaceless use verbatim';
var TAGS = 'apply autoescape block deprecated do embed extends filter flush for from' +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a space here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you broke the if endif tags...

'if import include macro sandbox set use verbatim with';

TAGS = TAGS + ' ' + TAGS.split(' ').map(function(t){return 'end' + t}).join(' ');

Expand Down