aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/HTML.hs
diff options
context:
space:
mode:
authorAmogh Rathore <amoghdroid09@gmail.com>2019-10-24 00:44:24 +0900
committerJohn MacFarlane <jgm@berkeley.edu>2019-10-23 08:44:24 -0700
commitd50f46d26d8584a03b775394de8878e028f8d8a4 (patch)
tree869c360311b2f615a4c8480f3e58759b13f34de9 /test/Tests/Readers/HTML.hs
parentb80bd174a23e17f5a5c656f51e8eac148abaf85d (diff)
downloadpandoc-d50f46d26d8584a03b775394de8878e028f8d8a4.tar.gz
Add Reader support for HTML <samp> element (#5843)
The `<samp>` element is parsed as a Span with class `sample`. Closes #5792.
Diffstat (limited to 'test/Tests/Readers/HTML.hs')
-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 be5178e07..17ca717ea 100644
--- a/test/Tests/Readers/HTML.hs
+++ b/test/Tests/Readers/HTML.hs
@@ -89,6 +89,12 @@ tests = [ testGroup "base tag"
, test htmlNativeDivs "<main> followed by text" $ "<main>main content</main>non-main content" =?>
doc (divWith ("", [], [("role", "main")]) (plain (text "main content")) <> plain (text "non-main content"))
]
+ , testGroup "samp"
+ [
+ test html "inline samp block" $
+ "<samp>Answer is 42</samp>" =?>
+ plain (codeWith ("",["sample"],[]) "Answer is 42")
+ ]
, askOption $ \(QuickCheckTests numtests) ->
testProperty "Round trip" $
withMaxSuccess (if QuickCheckTests numtests == defaultValue