This fixes an error when no styles exist for a cell and we were getting a MatchError due to assuming that Enum.filter call in sax_event_handler would always return at least one element. To fix the error, we're a little safer when handling the result of Enum.filter if a tuple is returned, continue with the existing happy path. In the case that nothing is returned, we simply append a '0' to indicate that there are no styles for that current cell.
Changes:
Xlsxir.ParseStyle.sax_event_handler/2 - Safer handling of values
Xlsxir.ParseWorksheet.find_styles/2 - Safer handling of expected values
This address #94
This fixes an error when no styles exist for a cell and we were getting a MatchError due to assuming that Enum.filter call in
sax_event_handler
would always return at least one element. To fix the error, we're a little safer when handling the result ofEnum.filter
if a tuple is returned, continue with the existing happy path. In the case that nothing is returned, we simply append a'0'
to indicate that there are no styles for that current cell.Changes:
Xlsxir.ParseStyle.sax_event_handler/2
- Safer handling of valuesXlsxir.ParseWorksheet.find_styles/2
- Safer handling of expected values