Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 13cd5e7bc32dad80e27f1e607cf64cbc9c51e6d2
Author: clime <clime(a)redhat.com>
Date: Mon Jan 25 17:19:31 2016 +0100
[frontend] remove trailing and leading whitespaces in links (at least for build links,
other links might still contain some)
---------------------------------------------------------------
frontend/coprs_frontend/coprs/__init__.py | 3 +++
.../coprs_frontend/coprs/templates/_helpers.html | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/__init__.py
b/frontend/coprs_frontend/coprs/__init__.py
index c3e5f4d..81459b3 100644
--- a/frontend/coprs_frontend/coprs/__init__.py
+++ b/frontend/coprs_frontend/coprs/__init__.py
@@ -86,6 +86,9 @@ app.register_blueprint(webhooks_ns)
app.add_url_rule("/", "coprs_ns.coprs_show",
coprs_general.coprs_show)
+app.jinja_env.trim_blocks = True
+app.jinja_env.lstrip_blocks = True
+
from coprs.rest_api import rest_api_bp, register_api_error_handler, URL_PREFIX
register_api_error_handler(app)
app.register_blueprint(rest_api_bp, url_prefix=URL_PREFIX)
diff --git a/frontend/coprs_frontend/coprs/templates/_helpers.html
b/frontend/coprs_frontend/coprs/templates/_helpers.html
index 2134b3d..6102dc8 100644
--- a/frontend/coprs_frontend/coprs/templates/_helpers.html
+++ b/frontend/coprs_frontend/coprs/templates/_helpers.html
@@ -310,14 +310,14 @@
{% macro build_href(build) %}
- {{ copr_url("coprs_ns.copr_build", build.copr, build_id=build.id) }}
+ {{- copr_url("coprs_ns.copr_build", build.copr, build_id=build.id) -}}
{% endmacro %}
{% macro build_href_from_sql(build) %}
{% if build.group_name %}
- {{ url_for('coprs_ns.group_copr_build', group_name=build.group_name,
coprname=build.copr_name, build_id=build.id) }}
+ {{- url_for('coprs_ns.group_copr_build', group_name=build.group_name,
coprname=build.copr_name, build_id=build.id) -}}
{% else %}
- {{ url_for("coprs_ns.copr_build", username = build.owner_name, coprname =
build.copr_name, build_id = build.id) }}
+ {{- url_for("coprs_ns.copr_build", username = build.owner_name, coprname =
build.copr_name, build_id = build.id) -}}
{% endif %}
{% endmacro %}