Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pulled data from the following pages from the Godot documentation:
All Classes
@GDScript
@GlobalScope
GDScript reference
Worth noting:
markdownhighlighter.cpp
The method
void MarkdownHighlighter::gdscriptHighlighter(const QString &text)
on line 1717 was created to highlight three items after making use of the existing highlighting systems in place took care of most of it:$NodePath
constructs. On GitHub's markdown, it is a little lazy as it only highlights the '$' symbol. My implementation is just as lazy, unfortunately. Ideally, we'd want the whole symbol$NodePath
to be highlighted like we see in the latest version of Godot Engine 4.3 as seen with the$AnimationPlayer
below. This likely involves seeking spaces, or periods, or newlines, etc. that I didn't do.%UniqueNote
constructs. Same issue as above, but with the '%' symbol.@
annotations. So this one is a little weird. I thought it would be sufficient to use the '@' symbol in the language data found in the qownlanguagedata.cpp file as an "Other" format. However, the default highlighting does not seem to highlight any{('@'), QLatin1String("@string")},
. I'm not sure why, but the work-around was to simply add valid annotations in the language data without their '@' symbol, then highlight the '@' on its own.