drupal 8 thtml in link code example
Example: drupal 8 HTML in type link
$link = [
'#type' => 'link',
'#title' => [
'#type' => 'inline_template',
'#template' => '{{ title }} <span class="icon-right-arrow"></span>',
'#context' => [
'title' => $title
],
],
'#url' => Url::fromRoute('user.pass'),
];