Skip to content

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

@altimore

Description

@altimore

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions