Skip to content

Instantly share code, notes, and snippets.

@bennadel
Created May 2, 2021 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennadel/24356fec4ad60604b19abacc14f76f1e to your computer and use it in GitHub Desktop.
Save bennadel/24356fec4ad60604b19abacc14f76f1e to your computer and use it in GitHub Desktop.
Using ColdFusion Custom Tags To Create An HTML Email DSL In Lucee CFML 5.3.7.47, Part XIV
<cfscript>
/**
* I split the given base-tag list, returning the array of tag-names.
*
* @value I am the list of tags-names being split.
*/
public array function splitBaseTagList( required string value )
cachedWithin = "request"
{
var tagNames = listToArray( arguments.value ).filter(
( tagName ) => {
// Some ColdFusion custom tags appear to be implemented as pseudo-custom
// tags that don't actually expose any state. As such, we have to omit
// these internal tags from the list otherwise our getBaseTagData() calls
// will blow-up.
return( arguments.tagName.reFindNoCase( "^cf_" ) );
}
);
return( tagNames );
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment