Skip to content

Commit 74b3063

Browse files
committed
fix(studio-bridge): avoid Handlebars parse error in plugin template
Handlebars interprets Luau's ~= operator followed by "{{" as its whitespace-stripping ~{{ syntax. Build the template sentinel string from parts so ~= is never adjacent to {{.
1 parent 98233d1 commit 74b3063

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/studio-bridge/templates/studio-bridge-plugin/src/StudioBridgePlugin.server.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ local ExecuteAction = require(script.Parent.Actions.ExecuteAction)
2626
-- Build constants (Handlebars templates before substitution)
2727
local PORT = "{{PORT}}"
2828
local SESSION_ID = "{{SESSION_ID}}"
29-
local IS_EPHEMERAL = (PORT ~= "{{" .. "PORT" .. "}}")
29+
local _PORT_TEMPLATE = "{" .. "{PORT}" .. "}"
30+
local IS_EPHEMERAL = (PORT ~= _PORT_TEMPLATE)
3031

3132
-- Only run inside Studio
3233
if not RunService:IsStudio() then

0 commit comments

Comments
 (0)