mbylstra / html-to-elm

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

SVG Output introduces unaccountable text elements. #12

Open pdamoc opened 8 years ago

pdamoc commented 8 years ago

Sample SVG:

<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="0 0 1000 1000">
  <defs>
    <clipPath id="a">
      <path d="M.06.04h999.893V1000H.06zm0 0"/>
    </clipPath>
  </defs>
  <g clip-path="url(#a)">
    <path d="M.06.04h999.893V1000H.06zm0 0" fill="#ee3833"/>
  </g>
 </svg>

outputs

svg [ height "1000", viewBox "0 0 1000 1000", width "1000", attribute "xmlns" "http://www.w3.org/2000/svg" ]
  [ defs []
    [ clipPath [ id "a" ]
      [ path [ d "M.06.04h999.893V1000H.06zm0 0" ]
        []
      , text "    "
      ]
    ]
  , g [ attribute "clip-path" "url(#a)" ]
    [ path [ d "M.06.04h999.893V1000H.06zm0 0", fill "#ee3833" ]
      []
    , text "  "
    ]
  ]