Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to write an attribute starting with the symbol # #174

Open
altimore opened this issue Oct 28, 2020 · 0 comments
Open

How to write an attribute starting with the symbol # #174

altimore opened this issue Oct 28, 2020 · 0 comments

Comments

@altimore
Copy link

Hello,

I'm trying to use the framework "bootstrap-vue" in an existing project which uses hamlpy.

To use tabs i need to generate the following html :

  <b-tabs>
    <b-tab active>
      <template #title>
        Tab 1
      </template>
      <p class="p-3">Tab contents 1</p>
    </b-tab>

    <b-tab>
      <template #title>
        Tab 2
      </template>
      <p class="p-3">Tab contents 2</p>
    </b-tab>
  </b-tabs>

Naturally i tried to generate it with the following syntax

%b-tabs
  %b-tab(active)
    %template(#title) Tab 1
    %p.p-3 Tab contents 1
  %b-tab
    %template(#title) Tab 2
    %p.p-3 Tab contents 2

but the syntax %template(#title) is raising an exception :

Unexpected "#". @ "    %b-tab
          %template(#" <-

What would be the way to write haml so this code is actually generated ?

Regards,

Thomas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant