aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorbucklereed <horridimpfoobarbaz@chammy.info>2017-06-27 09:19:37 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-27 10:19:37 +0200
commit460b6c470bae26f31d7c0d72b85aef8eb254b7f7 (patch)
treeefeaf9e334358909f4f341dcc06cbab80b481187 /test/Tests/Readers
parent19d9482fc400cf486547b6a670c946d3634401cf (diff)
downloadpandoc-460b6c470bae26f31d7c0d72b85aef8eb254b7f7.tar.gz
HTML reader: Use the lang value of <html> to set the lang meta value. (#3765)
* HTML reader: Use the lang value of <html> to set the lang meta value. * Fix for pre-AMP environments.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/HTML.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Tests/Readers/HTML.hs b/test/Tests/Readers/HTML.hs
index 8647540b6..da6298e76 100644
--- a/test/Tests/Readers/HTML.hs
+++ b/test/Tests/Readers/HTML.hs
@@ -30,4 +30,10 @@ tests = [ testGroup "base tag"
[ test html "anchor without href" $ "<a name=\"anchor\"/>" =?>
plain (spanWith ("anchor",[],[]) mempty)
]
+ , testGroup "lang"
+ [ test html "lang on <html>" $ "<html lang=\"es\">hola" =?>
+ setMeta "lang" (text "es") (doc (plain (text "hola")))
+ , test html "xml:lang on <html>" $ "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"es\"><head></head><body>hola</body></html>" =?>
+ setMeta "lang" (text "es") (doc (plain (text "hola")))
+ ]
]