Skip to content

Commit

Permalink
Add TODOs about CellRich parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesku committed Jun 6, 2024
1 parent 408fd07 commit c489d9d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Codec/Xlsx/Parser/Stream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ makeLenses 'MkSheetState
-- | State for parsing shared strings
data SharedStringsState = MkSharedStringsState
{ _ss_string :: TB.Builder -- ^ String we are parsing
-- TODO: At the moment SharedStrings can be used only to create CellText values.
-- We should add support for CellRich values.
, _ss_list :: DL.DList Text -- ^ list of shared strings
} deriving stock (Generic, Show)
makeLenses 'MkSharedStringsState
Expand Down Expand Up @@ -257,6 +259,7 @@ parseSharedStrings
)
=> HexpatEvent -> m (Maybe Text)
parseSharedStrings = \case
-- TODO: Add parsing of text styles to further create CellRich values.
StartElement "si" _ -> Nothing <$ (ss_string .= mempty)
EndElement "si" -> Just . LT.toStrict . TB.toLazyText <$> gets _ss_string
CharacterData txt -> Nothing <$ (ss_string <>= TB.fromText txt)
Expand Down

0 comments on commit c489d9d

Please sign in to comment.