GDScript code highlighting#2892
Conversation
|
Visually, I think this looks good. A few comments, some about undocumented conventions (sorry!):
Holler if any of this needs more explanation. With changes, I can do a more thorough review. |
|
I added a separate gdscript-prism.js file to inject the syntax highlighting. I'm not sure how to get syntax highlighting working in the activecode. It looks like it uses code mirror, and I think there is a gdscript module for code mirror. So, I'll need to look into that for a future version. There are now 2 examples in the sample book as well as the godot-shell folder that holds the godot wasm files. Sorry about the merge commits. In the future, I won't update the branch after making changes to it. I submitted a pull request for the rs changes, and I'll let you know when it goes through. |
|
I also had some trouble with indentation with a code in a program in a statement for an activity. (Maybe it's all the nesting.) |
|
The JavaScriptBridge filtering is to address the largest security concern with using a Godot WASM file. The filtering restricts JavaScript calls that aren't specifically postMessages that have a JSON dictionary as a payload, and a known origin. As long as eval isn't used on the JSON dictionary, this should restrict calls to actual GDScript instead of allowing arbitrary javascript code to be run in the WASM. |
with default parameters godot.version and godot.shell that can be modified using stringparams
|
Is the Runestone side ready on this? @bnmnetp was just asking. Is this ready? You could mark it as a Draft if not. But post here when it comes off being a draft, as I don't always see that. Thanks. |
|
Hi @DavidCooperWCU! I've given this a first pass. Some details to work out, like the correct XSL, publisher options, etc. Nothing we can't get straight. Binary blobs ( |
|
@rbeezer I'm happy to make any changes you feel are necessary. Just let me know. I did respond to your message on |
|
I have the .zip working in the wasm. The next step is to have a way of converting the directory for a gdscript activecode interaction to a zip during the pretext build. |
Made necessary changes for GDScript 2.0 highlighting.
Documentation was updated to include runestone support, but runestone activecode isn't working yet. (Right now it's set to work with JOBE, but I'm leaning towards a client side solution more like sql.)
Prism has GDScript 1.0 highlighting, so I had to add some custom javascript to handle code with
@.Latex's
listingslibrary supports python, which is pretty close, but not a perfect match.