$aubbc->add_tag(
'tag' => 'Tag', # Tag name:
'type' => '#', # Type number: tag style
'function' => '', # Function: subroutine to expand methods
'message' => 'any', # Message: of tag
'extra' => '', # Extra: of tag
'markup' => '', # Template: output
);
####
# This is an example of bold and italic in the same add_tag()
# Tags: [b]message[/b] or [i]message[/i]
# Output: message or message
$aubbc->add_tag(
'tag' => 'b|i', # b or i
'type' => '2',
'function' => '',
'message' => 'any',
'extra' => '',
'markup' => '<%{tag}>%{message}%{tag}>',
);
####
sub new_function {
# $tag, $message, $attrs are the captured group of its place
my ($type, $tag, $message, $markup, $extra, $attrs) = @_;
# expand functions....
# A) if there is a $message and blank $markup the $message will replace the tag.
# B) if there is both $message and $markup, then $message can be inserted
# into $markup if $markup has %{message} or any "Markup Template Tags",
# then markup will replace the tag.
# C) if both are blank the tag doesnt change.
return ($message, $markup);
# May have to return more so we have better/more controle
}
####
# tag: [dd=Stuff 7 attr=33]stuff[/dd]
# output: