From 052684712b8a36854c622468f5d4ddd367199c1c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 25 Mar 2019 08:43:59 -0700 Subject: HTML reader: read `data-foo` attribute into `foo`. The HTML writer adds the `data-` prefix for HTML5 for nonstandard attributes. But the attributes are represented in the AST without the `data-` prefix, so we should strip this when reading HTML. Closes #5392. --- test/Tests/Readers/HTML.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/Tests') diff --git a/test/Tests/Readers/HTML.hs b/test/Tests/Readers/HTML.hs index 69078d955..be5178e07 100644 --- a/test/Tests/Readers/HTML.hs +++ b/test/Tests/Readers/HTML.hs @@ -83,7 +83,7 @@ tests = [ testGroup "base tag" , test htmlNativeDivs "
becomes
" $ "
hello
" =?> doc (divWith ("", [], [("role", "foobar")]) (plain (text "hello"))) , test htmlNativeDivs "
has attributes preserved" $ "
hello
" =?> - doc (divWith ("foo", ["bar"], [("role", "main"), ("data-baz", "qux")]) (plain (text "hello"))) + doc (divWith ("foo", ["bar"], [("role", "main"), ("baz", "qux")]) (plain (text "hello"))) , test htmlNativeDivs "
closes

" $ "

hello

main content
" =?> doc (para (text "hello") <> divWith ("", [], [("role", "main")]) (plain (text "main content"))) , test htmlNativeDivs "
followed by text" $ "
main content
non-main content" =?> -- cgit v1.2.3