Skip to content

Instantly share code, notes, and snippets.

@Arcath
Created November 18, 2010 18:18
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 Arcath/705370 to your computer and use it in GitHub Desktop.
Save Arcath/705370 to your computer and use it in GitHub Desktop.
TrainBBCode Callback Demo
def up_handler(input)
input.upcase
end
>> "[up]HeLlo WorLd[/up]".tbbc(:custom_tags => [[/\[up\](.*?)\[\/up\]/,"Callback: up_handler",true]])
=> "HELLO WORLD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment