From d366e14ea77dcaf4d02406b32676b89c9f63bae5 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 10 Apr 2016 10:16:24 -0400 Subject: [PATCH] Fix Docs::Parse#document? when document has no doctype --- lib/docs/core/parser.rb | 2 +- test/lib/docs/core/parser_test.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/docs/core/parser.rb b/lib/docs/core/parser.rb index 43a08904..b3bf7915 100644 --- a/lib/docs/core/parser.rb +++ b/lib/docs/core/parser.rb @@ -11,7 +11,7 @@ module Docs private def document? - @content =~ /\A\s*" do body = '
Test
' assert_equal '
Test
', parser(body).html.inner_html + + body = '
Test
' + assert_equal '
Test
', parser(body).html.inner_html end end end