feat: update question parser to preserve text structure (#232)

This commit is contained in:
Kristin Aoki
2023-02-07 14:31:41 -05:00
committed by GitHub
parent 7e8f9a2f0c
commit 613b8d16ae
6 changed files with 90 additions and 47 deletions

View File

@@ -26,8 +26,8 @@ export const getDataFromOlx = ({ rawOLX, rawSettings }) => {
try {
olxParser = new OLXParser(rawOLX);
parsedProblem = olxParser.getParsedOLXData();
} catch {
console.error('The Problem Could Not Be Parsed from OLX. redirecting to Advanced editor.');
} catch (error) {
console.error('The Problem Could Not Be Parsed from OLX. redirecting to Advanced editor.', error);
return { problemType: ProblemTypeKeys.ADVANCED, rawOLX, settings: parseSettings(rawSettings) };
}
if (parsedProblem?.problemType === ProblemTypeKeys.ADVANCED) {