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

The character $ in a question can be confusing. #11

Closed
bobkummerfeld opened this issue May 31, 2020 · 3 comments
Closed

The character $ in a question can be confusing. #11

bobkummerfeld opened this issue May 31, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@bobkummerfeld
Copy link

A question like:
Quiz title: Shell if

  1. What does this script print: NAME=Alice; if [ $NAME == Alice ] ; then echo Hi Alice!; fi

causes an infinite loop. If I remove the $ it works. I assume this is interacting with the LaTex math syntax. $$ seems to work..

I suggest adding to the documentation to point this out.

@bobkummerfeld
Copy link
Author

bobkummerfeld commented May 31, 2020

$$ is shown as $$ on the question. Is there a way of getting a single $ in the question? Also, \$ doesn't work - give infinite loop again.

@gpoore gpoore added the bug Something isn't working label Jun 1, 2020
@gpoore
Copy link
Owner

gpoore commented Jun 1, 2020

It should work now in the dev version after the last commit; the $ will just pass through as $ if it isn't followed by another $ later that fulfills the LaTeX math pattern. The regex for finding LaTeX math was causing catastrophic backtracking.

@bobkummerfeld
Copy link
Author

Works fine now - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants