diff --git a/core/modules/system/templates/links.html.twig b/core/modules/system/templates/links.html.twig
index 21ab95d..479f0dd 100644
--- a/core/modules/system/templates/links.html.twig
+++ b/core/modules/system/templates/links.html.twig
@@ -36,25 +36,25 @@
  * @ingroup themeable
  */
 #}
-{% if links -%}
-  {%- if heading -%}
-    {%- if heading.level -%}
+{% if links %}
+  {% if heading %}
+    {% if heading.level %}
       <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
-    {%- else -%}
+    {% else %}
       <h2{{ heading.attributes }}>{{ heading.text }}</h2>
-    {%- endif -%}
-  {%- endif -%}
+    {% endif %}
+  {% endif %}
   <ul{{ attributes }}>
-    {%- for key, item in links -%}
+    {% for key, item in links %}
       <li{{ item.attributes.addClass(key|clean_class) }}>
-        {%- if item.link -%}
+        {% if item.link %}
           {{ item.link }}
-        {%- elseif item.text_attributes -%}
+        {% elseif item.text_attributes %}
           <span{{ item.text_attributes }}>{{ item.text }}</span>
-        {%- else -%}
+        {% else %}
           {{ item.text }}
-        {%- endif -%}
+        {% endif %}
       </li>
-    {%- endfor -%}
+    {% endfor %}
   </ul>
-{%- endif %}
+{% endif %}
diff --git a/core/modules/views_ui/src/Tests/DisplayTest.php b/core/modules/views_ui/src/Tests/DisplayTest.php
index 12c06bd..5b1a8f8 100644
--- a/core/modules/views_ui/src/Tests/DisplayTest.php
+++ b/core/modules/views_ui/src/Tests/DisplayTest.php
@@ -191,7 +191,9 @@ public function testPageContextualLinks() {
     $response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-display')));
     $this->assertResponse(200);
     $json = Json::decode($response);
-    $this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="entityviewedit-form"><a href="' . base_path() . 'admin/structure/views/view/test_display/edit/page_1">Edit view</a></li></ul>');
+    #$this->assertIdentical($json[$id], '<ul class="contextual-links"><li class="entityviewedit-form"><a href="' . base_path() . 'admin/structure/views/view/test_display/edit/page_1">Edit view</a></li></ul>');
+    $rows = $this->xpath('//ul/li/a[href="@href"]',array('href'=>base_path().'admin/structure/views/view/test_display/edit/page_1');
+    $this->assertEqual(1,count($rows),'One row with the matching href');
   }
 
   /**
diff --git a/core/themes/classy/templates/navigation/links.html.twig b/core/themes/classy/templates/navigation/links.html.twig
index 5f62ac3..1d91953 100644
--- a/core/themes/classy/templates/navigation/links.html.twig
+++ b/core/themes/classy/templates/navigation/links.html.twig
@@ -34,25 +34,25 @@
  * @see template_preprocess_links()
  */
 #}
-{% if links -%}
-  {%- if heading -%}
-    {%- if heading.level -%}
+{% if links %}
+  {% if heading %}
+    {% if heading.level %}
       <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
-    {%- else -%}
+    {% else %}
       <h2{{ heading.attributes }}>{{ heading.text }}</h2>
-    {%- endif -%}
-  {%- endif -%}
+    {% endif %}
+  {% endif %}
   <ul{{ attributes }}>
-    {%- for key, item in links -%}
+    {% for key, item in links %}
       <li{{ item.attributes.addClass(key|clean_class) }}>
-        {%- if item.link -%}
+        {% if item.link %}
           {{ item.link }}
-        {%- elseif item.text_attributes -%}
+        {% elseif item.text_attributes %}
           <span{{ item.text_attributes }}>{{ item.text }}</span>
-        {%- else -%}
+        {% else %}
           {{ item.text }}
-        {%- endif -%}
+        {% endif %}
       </li>
-    {%- endfor -%}
+    {% endfor %}
   </ul>
-{%- endif %}
+{% endif %}
