mirror of
https://github.com/godotengine/godot-vscode-plugin.git
synced 2025-12-31 13:48:24 +03:00
Fix scene preview with nodes, that have spaces in names (#806)
Fixes #688
This commit is contained in:
committed by
GitHub
parent
e528384ea5
commit
34de1b64f0
@@ -87,9 +87,9 @@ export class SceneParser {
|
||||
const nodeRegex = /\[node.*/g;
|
||||
for (const match of text.matchAll(nodeRegex)) {
|
||||
const line = match[0];
|
||||
const name = line.match(/name="([\w]+)"/)?.[1];
|
||||
const name = line.match(/name="([^.:@/"%]+)"/)?.[1];
|
||||
const type = line.match(/type="([\w]+)"/)?.[1] ?? "PackedScene";
|
||||
let parent = line.match(/parent="([\w\/.]+)"/)?.[1];
|
||||
let parent = line.match(/parent="(([^.:@/"%]|[\/.])+)"/)?.[1];
|
||||
const instance = line.match(/instance=ExtResource\(\s*"?([\w]+)"?\s*\)/)?.[1];
|
||||
|
||||
// leaving this in case we have a reason to use these node paths in the future
|
||||
|
||||
Reference in New Issue
Block a user