|
@@ -218,7 +218,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
int brk_end = bbcode.find_char(']', brk_pos + 1);
|
|
int brk_end = bbcode.find_char(']', brk_pos + 1);
|
|
|
|
|
|
if (brk_end == -1) {
|
|
if (brk_end == -1) {
|
|
- String text = bbcode.substr(brk_pos, bbcode.length() - brk_pos);
|
|
|
|
|
|
+ String text = bbcode.substr(brk_pos);
|
|
if (code_tag || tag_stack.size() > 0) {
|
|
if (code_tag || tag_stack.size() > 0) {
|
|
output.append("'" + text + "'");
|
|
output.append("'" + text + "'");
|
|
}
|
|
}
|
|
@@ -229,7 +229,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
String tag = bbcode.substr(brk_pos + 1, brk_end - brk_pos - 1);
|
|
String tag = bbcode.substr(brk_pos + 1, brk_end - brk_pos - 1);
|
|
|
|
|
|
if (tag.begins_with("/")) {
|
|
if (tag.begins_with("/")) {
|
|
- bool tag_ok = tag_stack.size() && tag_stack.front()->get() == tag.substr(1, tag.length());
|
|
|
|
|
|
+ bool tag_ok = tag_stack.size() && tag_stack.front()->get() == tag.substr(1);
|
|
|
|
|
|
if (!tag_ok) {
|
|
if (!tag_ok) {
|
|
output.append("]");
|
|
output.append("]");
|
|
@@ -246,7 +246,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
const int tag_end = tag.find_char(' ');
|
|
const int tag_end = tag.find_char(' ');
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
- const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
|
|
|
|
|
|
+ const String link_target = tag.substr(tag_end + 1).lstrip(" ");
|
|
|
|
|
|
const Vector<String> link_target_parts = link_target.split(".");
|
|
const Vector<String> link_target_parts = link_target.split(".");
|
|
|
|
|
|
@@ -401,7 +401,7 @@ String BindingsGenerator::bbcode_to_text(const String &p_bbcode, const TypeInter
|
|
pos = brk_end + 1;
|
|
pos = brk_end + 1;
|
|
tag_stack.push_front(tag);
|
|
tag_stack.push_front(tag);
|
|
} else if (tag.begins_with("url=")) {
|
|
} else if (tag.begins_with("url=")) {
|
|
- String url = tag.substr(4, tag.length());
|
|
|
|
|
|
+ String url = tag.substr(4);
|
|
// Not supported. Just append the url.
|
|
// Not supported. Just append the url.
|
|
output.append(url);
|
|
output.append(url);
|
|
|
|
|
|
@@ -497,7 +497,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
|
|
|
|
if (brk_end == -1) {
|
|
if (brk_end == -1) {
|
|
if (!line_del) {
|
|
if (!line_del) {
|
|
- String text = bbcode.substr(brk_pos, bbcode.length() - brk_pos);
|
|
|
|
|
|
+ String text = bbcode.substr(brk_pos);
|
|
if (code_tag || tag_stack.size() > 0) {
|
|
if (code_tag || tag_stack.size() > 0) {
|
|
xml_output.append(text.xml_escape());
|
|
xml_output.append(text.xml_escape());
|
|
} else {
|
|
} else {
|
|
@@ -522,7 +522,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
String tag = bbcode.substr(brk_pos + 1, brk_end - brk_pos - 1);
|
|
String tag = bbcode.substr(brk_pos + 1, brk_end - brk_pos - 1);
|
|
|
|
|
|
if (tag.begins_with("/")) {
|
|
if (tag.begins_with("/")) {
|
|
- bool tag_ok = tag_stack.size() && tag_stack.front()->get() == tag.substr(1, tag.length());
|
|
|
|
|
|
+ bool tag_ok = tag_stack.size() && tag_stack.front()->get() == tag.substr(1);
|
|
|
|
|
|
if (!tag_ok) {
|
|
if (!tag_ok) {
|
|
if (!line_del) {
|
|
if (!line_del) {
|
|
@@ -558,7 +558,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
} else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
|
|
const int tag_end = tag.find_char(' ');
|
|
const int tag_end = tag.find_char(' ');
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
const String link_tag = tag.substr(0, tag_end);
|
|
- const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
|
|
|
|
|
|
+ const String link_target = tag.substr(tag_end + 1).lstrip(" ");
|
|
|
|
|
|
const Vector<String> link_target_parts = link_target.split(".");
|
|
const Vector<String> link_target_parts = link_target.split(".");
|
|
|
|
|
|
@@ -763,7 +763,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
|
|
pos = brk_end + 1;
|
|
pos = brk_end + 1;
|
|
tag_stack.push_front(tag);
|
|
tag_stack.push_front(tag);
|
|
} else if (tag.begins_with("url=")) {
|
|
} else if (tag.begins_with("url=")) {
|
|
- String url = tag.substr(4, tag.length());
|
|
|
|
|
|
+ String url = tag.substr(4);
|
|
xml_output.append("<a href=\"");
|
|
xml_output.append("<a href=\"");
|
|
xml_output.append(url);
|
|
xml_output.append(url);
|
|
xml_output.append("\">");
|
|
xml_output.append("\">");
|
|
@@ -3011,7 +3011,7 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf
|
|
}
|
|
}
|
|
|
|
|
|
// Apparently the name attribute must not include the @
|
|
// Apparently the name attribute must not include the @
|
|
- String param_tag_name = iarg.name.begins_with("@") ? iarg.name.substr(1, iarg.name.length()) : iarg.name;
|
|
|
|
|
|
+ String param_tag_name = iarg.name.begins_with("@") ? iarg.name.substr(1) : iarg.name;
|
|
// Escape < and > in the attribute default value
|
|
// Escape < and > in the attribute default value
|
|
String param_def_arg = def_arg.replacen("<", "<").replacen(">", ">");
|
|
String param_def_arg = def_arg.replacen("<", "<").replacen(">", ">");
|
|
|
|
|