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

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

Issue 236673002: Simplify whitespace handling in build/ Jinja templates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more FIXME Created 6 years, 8 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 | « Source/build/scripts/templates/StylePropertyShorthand.h.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/templates/macros.tmpl
diff --git a/Source/build/scripts/templates/macros.tmpl b/Source/build/scripts/templates/macros.tmpl
index b805c98d360dae05607ab6813711b52388d7f80e..8d08c812f3d9c3faccfc31e3d514bef0a4067e15 100644
--- a/Source/build/scripts/templates/macros.tmpl
+++ b/Source/build/scripts/templates/macros.tmpl
@@ -1,17 +1,18 @@
+{# FIXME: replace with custom filter (already in bindings) #}
{% macro wrap_with_condition(condition) %}
-{%- if condition %}
+{% if condition %}
#if ENABLE({{condition}})
-{{- caller() }}
+{{ caller() -}}
#endif
-{%- else %}
-{{- caller() }}
+{% else %}
+{{ caller() }}
{%- endif %}
-{%- endmacro %}
+{% endmacro %}
{#
FIXME: Do we need to put license blocks in generated files?
#}
-{% macro license() -%}
+{% macro license() %}
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
@@ -43,6 +44,6 @@
*/
{%- endmacro %}
-{% macro lower_first(s) -%}
+{% macro lower_first(s) %}
{{ (s[0]|lower) + s[1:] }}
{%- endmacro %}
« no previous file with comments | « Source/build/scripts/templates/StylePropertyShorthand.h.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698