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

Fix issue with unevaluated exercise chunk option in learnr's knitr hooks #758

Merged
merged 3 commits into from
Feb 21, 2023

Conversation

gadenbuie
Copy link
Member

Fixes #757

If symbols – like T or a variable – are used in the exercise chunk option, this would cause an error in the checks that run to validate the exercise chunk by comparing with the source chunk because the source chunk options aren't yet evaluated.

This PR evaluates the source chunk option before comparing it with our exercise chunk.

Copy link
Contributor

@rossellhayes rossellhayes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I have a question, but no concerns

R/knitr-hooks.R Show resolved Hide resolved
@gadenbuie gadenbuie merged commit e0a42bd into main Feb 21, 2023
@gadenbuie gadenbuie deleted the fix/757-eval-chunk-opts branch February 21, 2023 14:29
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.

exercise = T causes error; exercise = TRUE works
2 participants