Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: third_party/WebKit/Source/build/scripts/templates/macros.tmpl

Issue 2680123002: Add Jinja2 macro for adding trailing strings. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/templates/macros.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/macros.tmpl b/third_party/WebKit/Source/build/scripts/templates/macros.tmpl
index 17a9f4952f510ce1664c028439103e7c6cf4fc56..2357d8fd09085f94cc241f01987d97535367f31e 100644
--- a/third_party/WebKit/Source/build/scripts/templates/macros.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/macros.tmpl
@@ -55,3 +55,8 @@ case {{ length }}:
{% endfor %}
}
{% endmacro %}
+
+
+{% macro trailing(loop, str) -%}
meade_UTC10 2017/02/13 06:19:58 Would it make sense to pass in loop.last here inst
shend 2017/02/13 06:40:37 Hmm, my intention for this macro is to print a str
meade_UTC10 2017/02/13 06:51:15 Hmm, it's really print_if_false right? I think it'
+{% if not loop.last %}{{str}}{% endif %}
+{%- endmacro %}
« no previous file with comments | « third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698