floki icon indicating copy to clipboard operation
floki copied to clipboard

Document type declaration (DOCTYPE) is not parsed

Open quentin-bettoum opened this issue 1 year ago • 0 comments

Hello,

I've noticed that the DOCTYPE is not parsed. I did not dig too much into the lib code yet, but it seems that it's supposed to be parsed.

iex> "<!DOCTYPE html><html></html>"|> Floki.parse_document!() |> Floki.raw_html() |> dbg()

"<!DOCTYPE html><html></html>" #=> "<!DOCTYPE html><html></html>"
|> Floki.parse_document!() #=> [{"html", [], []}]
|> Floki.raw_html() #=> "<html></html>"

"<html></html>"

quentin-bettoum avatar Jun 23 '24 13:06 quentin-bettoum