diff -u b/core/modules/color/color.module b/core/modules/color/color.module --- b/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -301,7 +301,7 @@ // Attempt to load preview HTML if the theme provides it. $preview_html_path = isset($info['preview_html']) ? drupal_get_path('theme', $theme) . '/' . $info['preview_html'] : drupal_get_path('module', 'color') . '/preview.html.twig'; - $variables['html_preview']['#markup'] = \Drupal::service('twig')->loadTemplate($preview_html_path, NULL)->render(array()); + $variables['html_preview']['#markup'] = \Drupal::service('twig')->loadTemplate($preview_html_path, NULL)->render([]); } /** diff -u b/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/preview.html.twig b/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/preview.html.twig --- b/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/preview.html.twig +++ b/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/preview.html.twig @@ -1,7 +1,13 @@

{% trans %}TEST COLOR PREVIEW{% endtrans %}

-

{% trans %}Sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{% endtrans %}

+

{% trans %}Sit amet, consectetur adipisicing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in + voluptate velit esse cillum dolore eu fugiat nulla pariatur. + Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia + deserunt mollit anim id est laborum.{% endtrans %}

diff -u b/core/modules/color/tests/src/Functional/ColorTranslationPreviewTest.php b/core/modules/color/tests/src/Functional/ColorTranslationPreviewTest.php --- b/core/modules/color/tests/src/Functional/ColorTranslationPreviewTest.php +++ b/core/modules/color/tests/src/Functional/ColorTranslationPreviewTest.php @@ -59,2 +59,3 @@ } + } \ No newline at end of file diff -u b/core/themes/bartik/color/preview.html.twig b/core/themes/bartik/color/preview.html.twig --- b/core/themes/bartik/color/preview.html.twig +++ b/core/themes/bartik/color/preview.html.twig @@ -2,7 +2,8 @@
Bartik
@@ -20,7 +21,8 @@

{% trans %}Example heading{% endtrans %}

{% trans %}This content is here to demonstrate what actual content would - look like in the color scheme you configure. This is a block of example content.{% endtrans %} + look like in the color scheme you configure. This is a block of example + content.{% endtrans %}
@@ -31,14 +33,14 @@

- {% trans %} This is a block of example content. This content is here to demonstrate what actual content would - look like in the color scheme you configure. - This is an example link, to demonstrate how background colors you configure may affect the - readability of links. - Another sentence to demonstrate what actual content would - look like in the color scheme you configure. - This is another example link. - This is the end of this block of example content.{% endtrans %} + {% trans %} This is a block of example content. This content is here to + demonstrate what actual content would look like in the color scheme you + configure.This is an example link, to demonstrate how + background colors you configure may affect the readability of links. + Another sentence to demonstrate what actual content would look like in + the color scheme you configure.This is another example + link.This is the end of this block of example content. + {% endtrans %}

@@ -51,8 +53,9 @@

{% trans %}Example heading{% endtrans %}

- {% trans %}This content is here to demonstrate what actual content would - look like in the color scheme you configure. This is a block of example content.{% endtrans %} + {% trans %}This content is here to demonstrate what actual content + would look like in the color scheme you configure. This is a block + of example content.{% endtrans %}