@@ -65,20 +65,20 @@ instance (BP.BalancedParens w, Rank0 w, Rank1 w, Select1 v, TestBit w) => XmlInd
6565
6666getIndexAt :: (BP. BalancedParens w , Rank0 w , Rank1 w , Select1 v , TestBit w ) => XmlIndexState -> XmlCursor BS. ByteString v w -> XmlIndex
6767getIndexAt state k = case uncons remainder of
68- Just (! c, cs) | isElementStart c -> parseElem cs
69- Just (! c, _ ) | isSpace c -> XmlIndexAttrList $ mapValuesFrom InAttrList (firstChild k)
70- Just (! c, _ ) | isAttribute && isQuote c -> XmlIndexAttrValue remainder
71- Just _ | isAttribute -> XmlIndexAttrName remainder
72- Just _ -> XmlIndexValue remainder
73- Nothing -> XmlIndexError " End of data"
68+ Just (! c, cs) | isElementStart c -> parseElem cs
69+ Just (! c, _ ) | isSpace c -> XmlIndexAttrList $ mapValuesFrom InAttrList (firstChild k)
70+ Just (! c, _ ) | isAttribute && isQuote c -> XmlIndexAttrValue remainder
71+ Just _ | isAttribute -> XmlIndexAttrName remainder
72+ Just _ -> XmlIndexValue remainder
73+ Nothing -> XmlIndexError " End of data"
7474 where remainder = remText k
7575 mapValuesFrom s = L. unfoldr (fmap (getIndexAt s &&& nextSibling))
7676 isAttribute = case state of
7777 InAttrList -> True
7878 InElement -> False
7979 Unknown -> case remText <$> parent k >>= uncons of
8080 Just (! c, _) | isSpace c -> True
81- _ -> False
81+ _ -> False
8282
8383 parseElem bs =
8484 case ABC. parse parseXmlElement bs of
0 commit comments