mbylstra/html-to-elm

Issue with single-quote in attribute

Closed this issue · 1 comments

kamn commented

Trying to convert the following template (from RealWorld project) fails part way because of a single quote in the plaecholder attribute

<form>
  <fieldset>
    <fieldset class="form-group">
      <input type="text" class="form-control" placeholder="What's this article about?">
    </fieldset>
    <button class="btn btn-lg pull-xs-right btn-primary" type="button">
      Publish Article
    </button>
  </fieldset>
</form>

and returns

form []
    [ fieldset []
        [ fieldset [ class "form-group" ]
            []
        ]
    ]

Compared to...

<form>
  <fieldset>
    <fieldset class="form-group">
      <input type="text" class="form-control" placeholder="Whats this article about?">
    </fieldset>
    <button class="btn btn-lg pull-xs-right btn-primary" type="button">
      Publish Article
    </button>
  </fieldset>
</form>

and...

form []
    [ fieldset []
        [ fieldset [ class "form-group" ]
            [ input [ class "form-control", placeholder "Whats this article about?", type_ "text" ]
                []
            ]
        , button [ class "btn btn-lg pull-xs-right btn-primary", type_ "button" ]
            [ text "Publish Article    " ]
        ]
    ]

Hi. Thanks for the issue. This has been fixed in 825da58 and published to the website.