mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-02-20 15:14:26 +01:00
Implement handling [color=white] like bbcode tags.
This commit is contained in:
parent
0e4222e5af
commit
33be242319
@ -167,10 +167,23 @@ void BBCodeParserTag::process() {
|
|||||||
|
|
||||||
if (fspc_index == -1) {
|
if (fspc_index == -1) {
|
||||||
// no args
|
// no args
|
||||||
|
|
||||||
|
int feq_ind = tag_text.find('=');
|
||||||
|
if (feq_ind == -1) {
|
||||||
tag = tag_text;
|
tag = tag_text;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Tag is like: [color=white]
|
||||||
|
//tag will be like color
|
||||||
|
tag = tag_text.substr(0, feq_ind);
|
||||||
|
|
||||||
|
//Add color=white as argument
|
||||||
|
parse_args(tag_text);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// grab the tag itself
|
// grab the tag itself
|
||||||
tag = tag_text.substr(0, fspc_index);
|
tag = tag_text.substr(0, fspc_index);
|
||||||
|
|
||||||
@ -253,7 +266,7 @@ void BBCodeParserTag::parse_args(const String &args) {
|
|||||||
// missing closing ' or " if c is ' or "
|
// missing closing ' or " if c is ' or "
|
||||||
// else missing parameter
|
// else missing parameter
|
||||||
|
|
||||||
a->data = args.substr(next_char_index, args.size() - next_char_index - 1);
|
a->data = args.substr(next_char_index, args.size() - next_char_index);
|
||||||
attributes.push_back(a);
|
attributes.push_back(a);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user