Skip to content

Attribute parsing fails #81

@stmichael

Description

@stmichael

I'm trying to translate a HAML template to HTML. The template looks as like this:

.a-class{"data-abc" => "my value"}

According to the HAML reference I expect it to be translated to:

<div class="a-class" data-abc="my value"/>

But haml-js always ignored the data-abc part. I couldn't figure out why until I dug deeper into the code and discovered that my HAML syntax was wrong. It should have been:

.a-class{"data-abc": "my value"}

(notice the : instead of =>)

Why does haml-js ignore the =>-Syntax? The reference clearly states that it is part of HAML.

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