Skip to content

Added recognition for ratios expressed with colons#41

Open
jerry-yyy wants to merge 1 commit intoCambridgeMolecularEngineering:masterfrom
jerry-yyy:feature-colon-ratio
Open

Added recognition for ratios expressed with colons#41
jerry-yyy wants to merge 1 commit intoCambridgeMolecularEngineering:masterfrom
jerry-yyy:feature-colon-ratio

Conversation

@jerry-yyy
Copy link

Modified the quantity.py file to include functionality for recognizing fractions/ratios that are expressed using a colon (e.g., Molar Raio '1:2'), in addition to the existing slash-based format (e.g., '1/2').

@Dingyun-Huang
Copy link
Member

Thank you for making this PR. I would suggest to create a separate expression named ratio instead of editing the fraction expression because ratio and fraction do have different meanings. Then add ratio as number = spaced_power_number | fraction | pure_number | ratio.

Otherwise, the change looks good to me 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants