on run {input, parameters}
repeat with anInput in input
if "/*" is in anInput then
set input to replaceText("/*", "", input as string)
set input to replaceText("*/", "", input as string)
return input
exit repeat
end if
end repeat
return "/*" & (input as string) & "*/"
end run
on replaceText(find, replace, textString)
set prevTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to find
set textString to text items of textString
set AppleScript's text item delimiters to replace
set textString to "" & textString
set AppleScript's text item delimiters to prevTIDs
return textString
end replaceText