Skip to content

Automatic Attribute adjustments #4

@MickyFln

Description

@MickyFln

I have an input field that has attributes depending on velocity variables.

<input type="text" class="tf-textinput__field__input"
      #if( $_placeholder ) placeholder="${placeholder}" #end
      #if( $_label ) aria-labelledby="${_ariaId}" #end
      #if( $_id ) id="${_id}" #end
      #if( $_name ) name="${_name}" #end>

However. The beautifier (I assume it is the beautifier) treats the #if statement like an own attribute and makes <input type="text" class="tf-textinput__field__input" #if( $_placeholder )="#if( $_placeholder )" placeholder="${placeholder}" #end="#end" #if( $_label )="#if( $_label )" aria-labelledby="${_ariaId}" #if( $_id )="#if( $_id )" id="${_id}" #if( $_name )="#if( $_name )" name="${_name}"> out of it.

All the #end s are gone as well. (because every single attribute may only occure once)

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