brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 45 forks source link

Choose Context modal doesn't show bad non-context strings #516

Closed asolove closed 5 months ago

asolove commented 6 months ago

Fixes #399

Previously, if your first line wasn't a use context declaration, the Choose Context modal would just grab an arbitrary substring of your first line, resulting in gibberish.

This change first checks if the first line is actually a use context. If so, it shows the current context. If not, it shows the current context as blank and lets you enter a new one.