|
1 | 1 | #include "editor_tools.h"
|
2 | 2 | #include "../ecmascript_language.h"
|
3 | 3 | #include "core/math/expression.h"
|
| 4 | +#include "core/os/keyboard.h" |
4 | 5 | #include "editor/filesystem_dock.h"
|
5 | 6 |
|
6 | 7 | #define TS_IGNORE "//@ts-ignore\n"
|
@@ -156,6 +157,7 @@ static String format_doc_text(const String &p_bbcode, const String &p_indent = "
|
156 | 157 | line = line.replace("[constant ", "`");
|
157 | 158 | line = line.replace("[", "`");
|
158 | 159 | line = line.replace("]", "`");
|
| 160 | + line = line.replace("*/", "* /"); // To solve issues with accidental multiline comment ends |
159 | 161 | }
|
160 | 162 |
|
161 | 163 | if (!in_code_block && i < lines.size() - 1) {
|
@@ -606,6 +608,17 @@ void ECMAScriptPlugin::_export_typescript_declare_file(const String &p_path) {
|
606 | 608 | dict["description"] = format_doc_text(enums[i]->description, "\t\t\t ");
|
607 | 609 | dict["name"] = format_property_name(enums[i]->name);
|
608 | 610 | dict["value"] = enums[i]->value;
|
| 611 | + |
| 612 | + // Exceptions |
| 613 | + |
| 614 | + /** |
| 615 | + * KEY_MASK_CMD docs has value listed as "platform-dependent", |
| 616 | + * so we have to retreive the actual value manually |
| 617 | + */ |
| 618 | + if (dict["name"] == "KEY_MASK_CMD") { |
| 619 | + dict["value"] = KEY_MASK_CMD; |
| 620 | + } |
| 621 | + |
609 | 622 | enum_str += apply_pattern(const_str, dict);
|
610 | 623 | }
|
611 | 624 | enum_str += "\t}\n";
|
|
0 commit comments