Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CFML syntax #3031

Merged
merged 4 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,6 @@
[submodule "assets/syntaxes/02_Extra/vscode-wgsl"]
path = assets/syntaxes/02_Extra/vscode-wgsl
url = https://github.com/PolyMeilex/vscode-wgsl.git
[submodule "assets/syntaxes/02_Extra/CFML"]
path = assets/syntaxes/02_Extra/CFML
url = https://github.com/jcberquist/sublimetext-cfml.git
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- Added auto detect syntax for `.jsonc` #2795 (@mxaddict)
- Added auto detect syntax for `.aws/{config,credentials}` #2795 (@mxaddict)
- Add syntax mapping for Wireguard config #2874 (@cyqsimon)
- Add support for [CFML](https://www.adobe.com/products/coldfusion-family.html), see #3031 (@brenton-at-pieces)

## Themes

Expand Down
1 change: 1 addition & 0 deletions assets/syntaxes/02_Extra/CFML
Submodule CFML added at b91c44
54 changes: 54 additions & 0 deletions tests/syntax-tests/highlighted/CFML/test.cfml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<head> 
<title>Add New Employees</title> 
</head> 
<body> 
<h1>Add New Employees</h1> 
<!--- Action page code for the form at the bottom of this page. ---> 
<!--- Establish parameters for first time through ---> 
<cfparam name="Form.firstname" default=""> 
<cfparam name="Form.lastname" default=""> 
<cfparam name="Form.email" default=""> 
<cfparam name="Form.phone" default=""> 
<cfparam name="Form.department" default=""> 
<!--- If at least the firstname form field is passed, create 
a structure named employee and add values. ---> 
<cfif #Form.firstname# eq ""> 
<p>Please fill out the form.</p> 
<cfelse> 
<cfoutput> 
<cfscript> 
employee=StructNew(); 
employee.firstname = Form.firstname; 
employee.lastname = Form.lastname; 
employee.email = Form.email; 
employee.phone = Form.phone; 
employee.department = Form.department; 
</cfscript> 
<!--- Display results of creating the structure. ---> 
First name is #StructFind(employee, "firstname")#<br> 
Last name is #StructFind(employee, "lastname")#<br> 
EMail is #StructFind(employee, "email")#<br> 
Phone is #StructFind(employee, "phone")#<br> 
Department is #StructFind(employee, "department")#<br> 
</cfoutput> 
<!--- Call the custom tag that adds employees. ---> 
<cf_addemployee empinfo="#employee#"> 
</cfif> 
<!--- The form for adding the new employee information ---> 
<hr> 
<form action="newemployee.cfm" method="Post"> 
First Name:&nbsp; 
<input name="firstname" type="text" hspace="30" maxlength="30"><br> 
Last Name:&nbsp; 
<input name="lastname" type="text" hspace="30" maxlength="30"><br> 
EMail:&nbsp; 
<input name="email" type="text" hspace="30" maxlength="30"><br> 
Phone:&nbsp; 
<input name="phone" type="text" hspace="20" maxlength="20"><br> 
Department:&nbsp; 
<input name="department" type="text" hspace="30" maxlength="30"><br> 
<input type="Submit" value="OK"> 
</form> 
<br> 
</body> 
</html>
54 changes: 54 additions & 0 deletions tests/syntax-tests/source/CFML/test.cfml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<head>
<title>Add New Employees</title>
</head>
<body>
<h1>Add New Employees</h1>
<!--- Action page code for the form at the bottom of this page. --->
<!--- Establish parameters for first time through --->
<cfparam name="Form.firstname" default="">
<cfparam name="Form.lastname" default="">
<cfparam name="Form.email" default="">
<cfparam name="Form.phone" default="">
<cfparam name="Form.department" default="">
<!--- If at least the firstname form field is passed, create
a structure named employee and add values. --->
<cfif #Form.firstname# eq "">
<p>Please fill out the form.</p>
<cfelse>
<cfoutput>
<cfscript>
employee=StructNew();
employee.firstname = Form.firstname;
employee.lastname = Form.lastname;
employee.email = Form.email;
employee.phone = Form.phone;
employee.department = Form.department;
</cfscript>
<!--- Display results of creating the structure. --->
First name is #StructFind(employee, "firstname")#<br>
Last name is #StructFind(employee, "lastname")#<br>
EMail is #StructFind(employee, "email")#<br>
Phone is #StructFind(employee, "phone")#<br>
Department is #StructFind(employee, "department")#<br>
</cfoutput>
<!--- Call the custom tag that adds employees. --->
<cf_addemployee empinfo="#employee#">
</cfif>
<!--- The form for adding the new employee information --->
<hr>
<form action="newemployee.cfm" method="Post">
First Name:&nbsp;
<input name="firstname" type="text" hspace="30" maxlength="30"><br>
Last Name:&nbsp;
<input name="lastname" type="text" hspace="30" maxlength="30"><br>
EMail:&nbsp;
<input name="email" type="text" hspace="30" maxlength="30"><br>
Phone:&nbsp;
<input name="phone" type="text" hspace="20" maxlength="20"><br>
Department:&nbsp;
<input name="department" type="text" hspace="30" maxlength="30"><br>
<input type="Submit" value="OK">
</form>
<br>
</body>
</html>