diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/doc_tools.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index cbd4a1b916..c752d0d4fd 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -1208,8 +1208,7 @@ Error DocTools::save_classes(const String &p_default_path, const Map<String, Str if (m.return_enum != String()) { enum_text = " enum=\"" + m.return_enum + "\""; } - _write_string(f, 3, "<return type=\"" + m.return_type + "\"" + enum_text + ">"); - _write_string(f, 3, "</return>"); + _write_string(f, 3, "<return type=\"" + m.return_type + "\"" + enum_text + " />"); } for (int j = 0; j < m.arguments.size(); j++) { @@ -1221,12 +1220,10 @@ Error DocTools::save_classes(const String &p_default_path, const Map<String, Str } if (a.default_value != "") { - _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " default=\"" + a.default_value.xml_escape(true) + "\">"); + _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " default=\"" + a.default_value.xml_escape(true) + "\" />"); } else { - _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + ">"); + _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " />"); } - - _write_string(f, 3, "</argument>"); } _write_string(f, 3, "<description>"); @@ -1274,8 +1271,7 @@ Error DocTools::save_classes(const String &p_default_path, const Map<String, Str _write_string(f, 2, "<signal name=\"" + m.name + "\">"); for (int j = 0; j < m.arguments.size(); j++) { const DocData::ArgumentDoc &a = m.arguments[j]; - _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\">"); - _write_string(f, 3, "</argument>"); + _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\" />"); } _write_string(f, 3, "<description>"); |