mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
A bit more work on fixing the html argument parser's indexing.
This commit is contained in:
parent
1fcc47b353
commit
43a7185e23
@ -118,13 +118,13 @@ void HTMLParserTag::parse_args(const String &args) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.attribute = args.substr(i, args.size() - equals_index - 1);
|
a.attribute = args.substr(i, equals_index - i);
|
||||||
a.attribute.print();
|
//a.attribute.print();
|
||||||
|
|
||||||
//todo
|
//todo
|
||||||
//a.trim();
|
//a.trim();
|
||||||
|
|
||||||
int next_char_index = equals_index;
|
int next_char_index = equals_index + 1;
|
||||||
|
|
||||||
//skip spaces
|
//skip spaces
|
||||||
while (data[next_char_index] == ' ') {
|
while (data[next_char_index] == ' ') {
|
||||||
@ -155,15 +155,17 @@ void HTMLParserTag::parse_args(const String &args) {
|
|||||||
|
|
||||||
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 - 1);
|
||||||
attributes.push_back(a);
|
attributes.push_back(a);
|
||||||
//a.data.print();
|
a.data.print();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.data = args.substr(next_char_index, args.size() - end_index - 2);
|
a.data = args.substr(next_char_index, end_index - next_char_index - 1);
|
||||||
attributes.push_back(a);
|
attributes.push_back(a);
|
||||||
//a.data.print();
|
//a.data.print();
|
||||||
|
|
||||||
i = end_index + 1;
|
i = end_index + 1;
|
||||||
|
|
||||||
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user