Skip to content

: character is not correctly escaped in a string when following an abstract function. #962

@Zehir

Description

@Zehir

Godot version

4.5.1 and 4.6.rc2

VS Code version

1.108.2

Godot Tools VS Code extension version

2.5.1

System information

Windows 11 x64

Issue description

The : character is not correctly escaped in a string. When it's followed by a abstract function (who does not have an ending :.

Inside Godot Script Editor: (it's ok)
Image

There is the same issue in the VScode extension and in Github preview.

Not working version

Image
@abstract
func _get_display_name() -> String

func _get_property_fullname(property: StringName) -> StringName:
	return StringName("%s:%s" % [_get_instance_name(), property])

func messed_up_func() -> void:
	prints("Everything here is broken")

Working version

func _get_property_fullname(property: StringName) -> StringName:
	return StringName("%s:%s" % [_get_instance_name(), property])

func messed_up_func() -> void:
	prints("Everything here is OK")

About the Github broken part I don't know where to report it if anybody can point me a direction.

Steps to reproduce

Create a script with the following code:

@abstract
func _get_display_name() -> String

func _get_property_fullname(property: StringName) -> StringName:
	return StringName("%s:%s" % [_get_instance_name(), property])

func messed_up_func() -> void:
	prints("Everything here is green")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions