Current section

86 Versions

Jump to

Compare versions

3 files changed
+13 additions
-2 deletions
  @@ -26,4 +26,4 @@
26 26 {<<"name">>,<<"mochiweb">>},
27 27 {<<"optional">>,false},
28 28 {<<"requirement">>,<<"~> 2.15">>}]]}.
29 - {<<"version">>,<<"0.19.0">>}.
29 + {<<"version">>,<<"0.19.1">>}.
  @@ -118,6 +118,17 @@ defmodule Floki do
118 118 raw_html(tail, html <> "<?xml " <> tag_attrs(attrs) <> "?>")
119 119 end
120 120
121 + defp raw_html([{:doctype, type, public, system} | tail], html) do
122 + attr =
123 + case {public, system} do
124 + {"", ""} -> ""
125 + {"", system} -> " SYSTEM \"#{system}\""
126 + {public, system} -> " PUBLIC \"#{public}\" \"#{system}\""
127 + end
128 +
129 + raw_html(tail, html <> "<!DOCTYPE #{type}#{attr}>")
130 + end
131 +
121 132 defp raw_html([{type, attrs, children} | tail], html) do
122 133 raw_html(tail, html <> tag_for(type, tag_attrs(attrs), children))
123 134 end
  @@ -2,7 +2,7 @@ defmodule Floki.Mixfile do
2 2 use Mix.Project
3 3
4 4 @description "Floki is a simple HTML parser that enables search for nodes using CSS selectors."
5 - @version "0.19.0"
5 + @version "0.19.1"
6 6
7 7 def project do
8 8 [