';
$this->assertRaw($expected);
$url = $url2;
$url_title = isset($new_value) ? truncate_utf8($url, $new_value, FALSE, TRUE) : $url;
$title = isset($new_value) ? truncate_utf8($title2, $new_value, FALSE, TRUE) : $title2;
- $expected = '
';
- $expected .= '
' . String::checkPlain($title) . '
';
- $expected .= '
';
+ $expected = '
';
+ $expected .= '
' . String::checkPlain($title) . '
';
+ $expected .= '
';
$expected .= '
';
$this->assertRaw($expected);
break;
case 'rel':
$rel = isset($new_value) ? ' rel="' . $new_value . '"' : '';
- $this->assertRaw('
');
- $this->assertRaw('
');
+ $this->assertRaw('
');
+ $this->assertRaw('
');
break;
case 'target':
$target = isset($new_value) ? ' target="' . $new_value . '"' : '';
- $this->assertRaw('
');
- $this->assertRaw('
');
+ $this->assertRaw('
');
+ $this->assertRaw('
');
break;
}
}
diff --git a/core/modules/link/templates/link-formatter-link-separate.html.twig b/core/modules/link/templates/link-formatter-link-separate.html.twig
index 16b91ed..4b58326 100644
--- a/core/modules/link/templates/link-formatter-link-separate.html.twig
+++ b/core/modules/link/templates/link-formatter-link-separate.html.twig
@@ -15,10 +15,10 @@
*/
#}
{% spaceless %}
-
+
{% if title %}
-
{{ title }}
+
{{ title }}
{% endif %}
-
{{ link }}
+
{{ link }}
{% endspaceless %}
diff --git a/core/themes/classy/templates/link-formatter-link-separate.html.twig b/core/themes/classy/templates/link-formatter-link-separate.html.twig
new file mode 100644
index 0000000..16b91ed
--- /dev/null
+++ b/core/themes/classy/templates/link-formatter-link-separate.html.twig
@@ -0,0 +1,24 @@
+{#
+/**
+ * @file
+ * Default theme implementation of a link with separate title and URL elements.
+ *
+ * Available variables:
+ * - link: The link that has already been formatted by l().
+ * - title: (optional) A descriptive or alternate title for the link, which may
+ * be different than the actual link text.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_link_formatter_link_separate()
+ *
+ * @ingroup themeable
+ */
+#}
+{% spaceless %}
+
+ {% if title %}
+
{{ title }}
+ {% endif %}
+
{{ link }}
+
+{% endspaceless %}