Skip to content

Escape apostrophes in docstrings #877

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

Merged

Conversation

JGreenlee
Copy link
Contributor

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

@JennaSys JennaSys changed the base branch from master to dev_3.9.4 May 23, 2025 04:55
@JennaSys JennaSys merged commit f59867c into TranscryptOrg:dev_3.9.4 May 23, 2025
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