Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed roll expression highlighting to work with damage types #152

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

draconas1
Copy link
Collaborator

The Foundry term parser does not like dice flavours that appear inside brackets:
e.g. ((1d6 + 10)[Fire])

The [fire] part would be ignored. This was unfortunate as I surrounded each term in brackets to make them easier for me to hightlight. Awkward.

Put some more complicated check in for the bracket calculations such that it spots if a term is (EXPRESSION)[FLAVOUR] and does not surrounded it with brackets, since it handily has some already for us.

…lem we have!

There were some edge cases that would result in a variable not getting properly highlighted, (error logged to console but invisible to user aside from highlighting falling back to the basic version).
@EndlesNights EndlesNights merged commit 7b24022 into EndlesNights:dev Jan 31, 2022
@draconas1 draconas1 deleted the fix-damage-types branch February 18, 2022 17:49
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