Syntax error in code example with image component
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3550876. --> Reported by: [mherchel](https://www.drupal.org/user/118428) Related to !209 >>> <h3 id="overview">Overview</h3> <p><em>Bug introduced in <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3538340" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3538340</a></span></em></p> <p>This example in the docs has a syntax error: <a href="https://project.pages.drupalcode.org/canvas/sdc-components/image/#usage-with-prop-values">https://project.pages.drupalcode.org/canvas/sdc-components/image/#usage-with-prop-values</a></p> <pre>{% include 'canvas:image' with image|merge({<br>&nbsp; loading: 'lazy',<br>&nbsp; sizes: '(max-width: 768px) 100vw, 50vw',<br>&nbsp; class: 'card--image',<br>&nbsp; attributes: create_attribute({<br>&nbsp;&nbsp;&nbsp; 'data-testid': 'card-component-image',<br>&nbsp; }),<br>} only %}</pre><p>It's missing a <code>)</code> right before the <code>only</code>. So it should be </p> <pre>{% include 'canvas:image' with image|merge({<br>&nbsp; loading: 'lazy',<br>&nbsp; sizes: '(max-width: 768px) 100vw, 50vw',<br>&nbsp; class: 'card--image',<br>&nbsp; attributes: create_attribute({<br>&nbsp;&nbsp;&nbsp; 'data-testid': 'card-component-image',<br>&nbsp; }),<br>}) only %}</pre><h3 id="proposed-resolution">Proposed resolution</h3> <h3 id="ui-changes">User interface changes</h3>
issue