Shortcode inside markdown table - why does delimiters matter?

In data/icons.yaml I have the following:

info:                <i class="fas fa-book"></i>
assignment:          <i class="fas fa-check"></i>
optional-assignment: <i class="fas fa-flask"></i>

I use the following shortcode to select one of the icons:

{{ safeHTML (index .Site.Data.icons (.Get 0))}}

When I use the shortcode with % as delimiters, for example:

This is the info icon: {{% icon info %}}

| Symbol                       | Description                                                                           |
| :-----:                      | --------                                                                              |
| {{% icon "info" %}}          | Nam euismod tellus id erat.                                                           |
| <i class="fas fa-book"></i>  | Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. |
| <i class="fas fa-flask"></i> | Sed id ligula quis est convallis tempor.                                              |

, the table doesn’t render properly. The first row is broken up into two rows.

12

If I use the < > delimiters the table renders correctly.

This is the info icon: {{< icon info >}}

| Symbol                       | Description                                                                           |
| :-----:                      | --------                                                                              |
| {{< icon "info" >}}          | Nam euismod tellus id erat.                                                           |
| <i class="fas fa-book"></i>  | Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. |
| <i class="fas fa-flask"></i> | Sed id ligula quis est convallis tempor.                                              |

01

Is this expected behaviour? If so, what causes the % delimiters to cause the table to “break”?

Hi there,

I can’t seem to replicate your issue. What version of Hugo are you using? Do you have your code somewhere we can have a look at?