Skip to content

Commit

Permalink
Detect available symbols with whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
sjd210 committed Oct 17, 2024
1 parent a6f9f35 commit b2e1300
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const IsaacSymbolicChemistryQuestion = ({doc, questionId, readonly}: IsaacQuesti
currentAttemptValue = jsonHelper.parseOrDefault(currentAttempt.value, {result: {tex: '\\textrm{PLACEHOLDER HERE}'}});
}

const hasMetaSymbols = !doc.availableSymbols?.every(symbol => CHEMICAL_ELEMENTS.includes(symbol) || CHEMICAL_PARTICLES.hasOwnProperty(symbol));
const hasMetaSymbols = !doc.availableSymbols?.every(symbol => CHEMICAL_ELEMENTS.includes(symbol.trim()) || CHEMICAL_PARTICLES.hasOwnProperty(symbol.trim()));

const symbolicInputValidator = (input: string) => {
const openRoundBracketsCount = input.split("(").length - 1;
Expand Down

0 comments on commit b2e1300

Please sign in to comment.