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

Escape apostrophes in docstrings #877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JGreenlee
Copy link

Fixes an issue that occurs when using the -d / --docat option, where apostrophes in docstrings do not get escaped.


__runtime__.py contains one example of this:

class __Terminal__:
'''
Printing to either the console or to html happens async, but is blocked by calling window.prompt.
So while all input and print statements are encountered in normal order, the print's exit immediately without yet having actually printed
This means the next input takes control, blocking actual printing and so on indefinitely
The effect is that everything's only printed after all inputs are done
To prevent that, what's needed is to only execute the next window.prompt after actual printing has been done
Since we've no way to find out when that is, a timeout is used.
'''

Resulting in invalid syntax in the output JS:
image

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.

1 participant