/cfwheels-shortcodes

A Shortcodes plugin for cfwheels

Primary LanguageColdFusion

The code has been updated with the following changes:

  • Fixed the return statement in the processShortcodes function to return the modified content.
  • Updated the visibility of internal functions ($sc_getRegex, $sc_processTag, $sc_invokeTag, $sc_parseAttributes, and $sc_REReplaceCallback) to be private.
  • Fixed the missing closing brace (}) in the returnShortcodes function.
  • Added missing catch block in the $sc_parseAttributes function to handle any errors.
  • Updated the reReplace function to reReplace for regular expression replacement.
  • Added function parameters (string, pattern, callback, scope) to the $sc_REReplaceCallback function.
  • Added missing closing brace (}) at the end of the component.
  • Removed the unnecessary i variable declaration outside the loop in the parseAttributes function.
  • Replaced the $sc_REReplaceCallback function with REReplaceCallback to match the updated function name.
  • Updated the REReplaceCallback function to remove the unused i variable and added a default value for the scope parameter.
  • Adjusted the start index in the REReplaceCallback function to 1 instead of 0 to align with the CFML string index convention.
  • Replaced the arrayAppend function with the CFML shorthand notation [] for array appending.
  • Removed the unused match variable declaration in the REReplaceCallback function.
  • Note: Please review the changes and ensure they fit your specific requirements, as there might be additional considerations not covered in the provided code snippets.