@@ -936,6 +936,11 @@ takeFramedByEsc_ =
936936 Just _ -> checkPass xs Nothing openMinusClose
937937 checkPass [] _ _ = False
938938
939+ checkPassBeg [] = False
940+ checkPassBeg xxs@(x:_)
941+ | isBegin x = checkPass xxs Nothing (0 :: Int)
942+ | otherwise = False
943+
939944 escapeFrame begin end escape l =
940945 let
941946 helper (x : xs) maybePrevEsc openMinusClose =
@@ -969,12 +974,12 @@ takeFramedByEsc_ =
969974 in
970975 case S.parse prsr (S.fromList ls) of
971976 Right parsed_list ->
972− if checkPass ls Nothing (0 :: Int)
977+ if checkPassBeg ls
973978 then checkListEqual parsed_list $
974979 escapeFrame isBegin isEnd isEsc ls
975980 else property False
976981 Left _ ->
977− if checkPass ls Nothing (0 :: Int)
982+ if checkPassBeg ls
978983 then property False
979984 else property True
980985