@@ -936,6 +936,11 @@ takeFramedByEsc_ =
936 Just _ -> checkPass xs Nothing openMinusClose
936 Just _ -> checkPass xs Nothing openMinusClose
937 checkPass [] _ _ = False
937 checkPass [] _ _ = False
939+ checkPassBeg [] = False
940+ checkPassBeg xxs@(x:_)
941+ | isBegin x = checkPass xxs Nothing (0 :: Int)
939 escapeFrame begin end escape l =
944 escapeFrame begin end escape l =
941 helper (x : xs) maybePrevEsc openMinusClose =
946 helper (x : xs) maybePrevEsc openMinusClose =
@@ -969,12 +974,12 @@ takeFramedByEsc_ =
970 case S.parse prsr (S.fromList ls) of
975 case S.parse prsr (S.fromList ls) of
971 Right parsed_list ->
976 Right parsed_list ->
972− if checkPass ls Nothing (0 :: Int)
977+ if checkPassBeg ls
973 then checkListEqual parsed_list $
978 then checkListEqual parsed_list $
974 escapeFrame isBegin isEnd isEsc ls
979 escapeFrame isBegin isEnd isEsc ls
975 else property False
980 else property False
976 Left _ ->
981 Left _ ->
977− if checkPass ls Nothing (0 :: Int)
982+ if checkPassBeg ls
978 then property False
983 then property False
979 else property True
984 else property True