mbylstra / html-to-elm

An online tool for converting HTML to elm-html. Go to
http://mbylstra.github.io/html-to-elm/
395 stars 23 forks source link

The ' character causes the parsing to stop/fail #15

Closed PhilippMeissner closed 8 years ago

PhilippMeissner commented 8 years ago

Hey,

Check the following HTML:

<div class="intro-heading">It's Nice To Meet You</div>

The ' character causes the output to become:

div [ class "intro-heading" ]
    [ text "It" ]

where as I expected:

div [ class "intro-heading" ]
    [ text "It's Nice To Meet You" ]

This becomes even more of a problem if there's more tags after the div containing a ' character:

<header>
  <div class="container">
    <div class="intro-text">
      <div class="intro-lead-in">Welcome To Our Studio!</div>
      <div class="intro-heading">It's Nice To Meet You</div>
      <a href="#services" class="page-scroll btn btn-xl">Tell Me More</a>
    </div>
  </div>
</header>

becomes

header []
    [ div [ class "container" ]
        [ div [ class "intro-text" ]
            [ div [ class "intro-lead-in" ]
                [ text "Welcome To Our Studio!" ]
            , div [ class "intro-heading" ]
                [ text "It" ]
            ]
        ]
    ]

As you can see, the entire link

<a href="#services" class="page-scroll btn btn-xl">Tell Me More</a>

is missing here.

Let me know if there's more I can do!

mbylstra commented 8 years ago

This should be working now.