HamlPy
HamlPy copied to clipboard
How to write an attribute starting with the symbol #
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.