attilabuti / vscode-mjml

This repo is archived. MJML preview, lint, compile for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=attilabuti.vscode-mjml
MIT License
144 stars 59 forks source link

Stripping out template tags #33

Closed gilesbutler closed 6 years ago

gilesbutler commented 6 years ago

Hey @attilabuti,

First off thanks for such an incredible extension, only just started working with mjml and your extension makes the developer experience unreal!!

I'm trying to render my mjml templates to .hbs files for handlebars but unfortunately the loops opening and closing tags are getting stripped out. For example...

{#each posts}
  <mj-section>
    <mj-column width="75%">
      <mj-text>
        <h3><a href="{link}">{title}</a></h3>
        {{excerpt}}
      </mj-text>
    </mj-column>
    <mj-column width="25%">
      <mj-image width="100px" href="{link}" src="{imageUrl}"></mj-image>
    </mj-column>
  </mj-section>
{/each}

{#each posts} and {/each} at the end get removed from the compiled markup but the other template tags in the middle render correctly.

Any ideas on how to fix it?

Thanks

gilesbutler commented 6 years ago

Hey @attilabuti,

All good. Solved it via this issue 👍

I wasn't aware of the mj-raw tag.