Skip to content

Commit e82caed

Browse files
Add word boundary to func highlighter regex (#1154)
1 parent ddd3054 commit e82caed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

autoload/TextUtils.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func _init() -> void:
4646

4747

4848
_REGEXES["code"].compile("\\[code\\](.+?)\\[\\/code\\]")
49-
_REGEXES["func"].compile("(?<func>func)")
49+
_REGEXES["func"].compile("(?<func>\\bfunc\\b)")
5050
_REGEXES["number"].compile("(?<number>-?\\d+(\\.\\d+)?)")
5151
_REGEXES["string"].compile("(?<string>[\"'].+[\"'])")
5252
_REGEXES["symbol"].compile("(?<symbol>[a-zA-Z][a-zA-Z0-9_]+|[a-zA-Z])")

0 commit comments

Comments
 (0)