From 9a2fcdc5b8c165f0c9dab9d241f068918ae08336 Mon Sep 17 00:00:00 2001 From: Sean Callahan Date: Thu, 3 Apr 2025 07:54:27 -0700 Subject: [PATCH 1/2] Update cfwhile.json Added support for ColdFusion for the script syntax as well as a script syntax example. --- data/en/cfwhile.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/en/cfwhile.json b/data/en/cfwhile.json index aa3f21cbf..128f2b1d6 100644 --- a/data/en/cfwhile.json +++ b/data/en/cfwhile.json @@ -10,7 +10,8 @@ {"name":"label","description":"Used to address loop from `break` or `continue` statement instead of innermost loop.","required":false,"default":"","type":"string","values":[]} ], "engines": { - "lucee": {"minimum_version":"", "notes":"", "docs":"https://docs.lucee.org/reference/tags/while.html"} + "lucee": {"minimum_version":"", "notes":"", "docs":"https://docs.lucee.org/reference/tags/while.html"}, + "coldfusion": {"minimum_version":"9", "notes":"Script only. Tag is not supported currently.", "docs":"https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/extending-coldfusion-pages-with-cfml-scripting/using-cfscript-statements.html#Usingwhileloops"} }, "links": [], "examples": [ @@ -27,6 +28,13 @@ "code": "\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n [#row#, #col#]\r\n\r\n \r\n \r\n \r\n", "result": "[0, 0] [0, 1] [0, 2]", "runnable": true + }, + { + "title": "Script syntax with break", + "description": "A while loop from 1 to 10 that breaks once the variable reaches 5", + "code": "i = 1;\nwhile (i <= 10) {\n writeDump(i);\n if (i == 5) {\n break;\n }\n i++;\n}", + "result": "12345", + "runnable": true } ] } From eb833cc6385ea89d6b1383f4ae6042973c799a2e Mon Sep 17 00:00:00 2001 From: Sean Callahan Date: Fri, 4 Apr 2025 07:53:34 -0700 Subject: [PATCH 2/2] Update cfwhile.json Script syntax with break usage and include a note of compatibility with ColdFusion. --- data/en/cfwhile.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/data/en/cfwhile.json b/data/en/cfwhile.json index 128f2b1d6..ada569240 100644 --- a/data/en/cfwhile.json +++ b/data/en/cfwhile.json @@ -10,8 +10,7 @@ {"name":"label","description":"Used to address loop from `break` or `continue` statement instead of innermost loop.","required":false,"default":"","type":"string","values":[]} ], "engines": { - "lucee": {"minimum_version":"", "notes":"", "docs":"https://docs.lucee.org/reference/tags/while.html"}, - "coldfusion": {"minimum_version":"9", "notes":"Script only. Tag is not supported currently.", "docs":"https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/extending-coldfusion-pages-with-cfml-scripting/using-cfscript-statements.html#Usingwhileloops"} + "lucee": {"minimum_version":"", "notes":"", "docs":"https://docs.lucee.org/reference/tags/while.html"} }, "links": [], "examples": [ @@ -31,7 +30,7 @@ }, { "title": "Script syntax with break", - "description": "A while loop from 1 to 10 that breaks once the variable reaches 5", + "description": "A while loop from 1 to 10 that breaks once the variable reaches 5. Note that Script syntax is valid in ColdFusion even though the tag syntax is not.", "code": "i = 1;\nwhile (i <= 10) {\n writeDump(i);\n if (i == 5) {\n break;\n }\n i++;\n}", "result": "12345", "runnable": true