From 2c94fae57dae42a426ace2eba86e5bf5d4cae0e5 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Thu, 27 Feb 2025 17:51:31 +1300 Subject: [PATCH] Fix play button on some code --- doc/playground-links.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/playground-links.js b/doc/playground-links.js index b30ea53..b0df820 100644 --- a/doc/playground-links.js +++ b/doc/playground-links.js @@ -36,7 +36,7 @@ function addPlayBtn({el, result, text}) { if (text.indexOf("style = {") > 0 || text.indexOf("gui.Style") > 0) return; - if (text.startsWith("gui.")) { + if (text.startsWith("gui.") && text.trim().endsWith("}")) { addPlaygroundBtn(el, TEMPLATE.replace("%", " return " + text.trim().replaceAll("\n", "\n "))); } else if (/^local (my_gui|form) = flow.make_gui\(function\(player, ctx\)\n/.test(text) &&