This commit is contained in:
Maximilian Tagher 2020-05-31 16:56:09 -04:00
parent 8e89ec0e40
commit 5c33dcb518

View File

@ -745,7 +745,7 @@ htmlNoneContain query search = do
-- --
-- > {-# LANGUAGE OverloadedStrings #-} -- > {-# LANGUAGE OverloadedStrings #-}
-- > get HomeR -- > get HomeR
-- > htmlNoneContain "p" 3 -- There are exactly 3 <p> tags in the response -- > htmlCount "p" 3 -- There are exactly 3 <p> tags in the response
htmlCount :: HasCallStack => Query -> Int -> YesodExample site () htmlCount :: HasCallStack => Query -> Int -> YesodExample site ()
htmlCount query count = do htmlCount query count = do
matches <- fmap DL.length $ htmlQuery query matches <- fmap DL.length $ htmlQuery query