aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-03-25 08:43:59 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-03-25 08:43:59 -0700
commit052684712b8a36854c622468f5d4ddd367199c1c (patch)
treed5bdf4faa964cbcfa18aaa7b9fab84b53bf49b22 /test
parente91af0a8a32d68af4c533fdf4b7caaafade577ef (diff)
downloadpandoc-052684712b8a36854c622468f5d4ddd367199c1c.tar.gz
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.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/HTML.hs2
1 files changed, 1 insertions, 1 deletions
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 "<main role=X> becomes <div role=X>" $ "<main role=foobar>hello</main>" =?>
doc (divWith ("", [], [("role", "foobar")]) (plain (text "hello")))
, test htmlNativeDivs "<main> has attributes preserved" $ "<main id=foo class=bar data-baz=qux>hello</main>" =?>
- 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 "<main> closes <p>" $ "<p>hello<main>main content</main>" =?>
doc (para (text "hello") <> divWith ("", [], [("role", "main")]) (plain (text "main content")))
, test htmlNativeDivs "<main> followed by text" $ "<main>main content</main>non-main content" =?>