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
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ New styles:
- *Night Owl* by [Carl Baxter][]

Improvements:
- enhance(twig) update list of filter and tags (#2090)
- fix(crystal): correctly highlight `!~` method definition (#2222)
- fix dropping characters if we choke up on a 0-width match (#2219)
- (accesslog) improve accesslog relevancy scoring (#2172)
Expand Down
12 changes: 6 additions & 6 deletions src/languages/twig.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,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 ' +
'if import include macro sandbox set use verbatim with';

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

Expand Down