Repository: godotengine/godot
File: modules/gdscript/editor/gdscript_highlighter.cpp (C++)

Code before:
										Dictionary marker_highlighter_info;
										marker_highlighter_info["color"] = comment_marker_colors[E->value];
										color_map[marker_start_pos] = marker_highlighter_info;

										Dictionary marker_continue_highlighter_info;
										marker_continue_highlighter_info["color"] = region_color;
										color_map[from] = marker_continue_highlighter_info;
									}
								}
								marker_start_pos = from + 1;
								marker_len = 0;
							}
							from++;
						}
						from = line_length - 1;
						j = from;
					} else {
						// Search the line.
						int region_end_index = -1;
						int end_key_length = color_regions[in_region].end_key.length();
						const char32_t *end_key = color_regions[in_region].end_key.get_data();
						for (; from < line_length; from++) {
							if (line_length - from < end_key_length) {
								// Don't break if '\' to highlight escape sequences,
								// and '%' and '{' to highlight placeholders.
								if (str.find_char('\\', from) < 0 && str.find_char('%', from) < 0 && str.find_char('{', from) < 0) {
									break;
								}
							}

							if (!is_symbol(str[from]) && str[from] != '%') {
								continue;
							}

							if (str[from] == '\\') {
								if (!color_regions[in_region].r_prefix) {
									Dictionary escape_char_highlighter_info;
									escape_char_highlighter_info["color"] = symbol_color;
									color_map[from] = escape_char_highlighter_info;
								}

								from++;

								if (!color_regions[in_region].r_prefix) {
									int esc_len = 0;
									if (str[from] == 'u') {
										esc_len = 4;
									} else if (str[from] == 'U') {
										esc_len = 6;
									}
									for (int k = 0; k < esc_len && from < line_length - 1; k++) {

Review comment (suggestion):
```suggestion
								if (str.find_char('\\', from) == -1 && str.find_char('%', from) == -1 && str.find_char('{', from) == -1) {
```
Better readability 

Code after:
										Dictionary marker_highlighter_info;
										marker_highlighter_info["color"] = comment_marker_colors[E->value];
										color_map[marker_start_pos] = marker_highlighter_info;

										Dictionary marker_continue_highlighter_info;
										marker_continue_highlighter_info["color"] = region_color;
										color_map[from] = marker_continue_highlighter_info;
									}
								}
								marker_start_pos = from + 1;
								marker_len = 0;
							}
							from++;
						}
						from = line_length - 1;
						j = from;
					} else {
						// Search the line.
						int region_end_index = -1;
						int end_key_length = color_regions[in_region].end_key.length();
						const char32_t *end_key = color_regions[in_region].end_key.get_data();
						int placeholder_end = from;
						for (; from < line_length; from++) {
							if (line_length - from < end_key_length) {
								// Don't break if '\' to highlight escape sequences,
								// and '%' and '{' to highlight placeholders.
								if (str.find_char('\\', from) == -1 && str.find_char('%', from) == -1 && str.find_char('{', from) == -1) {
									break;
								}
							}

							if (!is_symbol(str[from]) && str[from] != '%') {
								continue;
							}

							if (str[from] == '%' || str[from] == '{') {
								int placeholder_start = from;
								bool is_percent = str[from] == '%';

								from++;

								if (is_percent) {
									if (str[from] == '%') {
										placeholder_end = from + 1;
									} else {
										const String allowed_chars = "+.-*0123456789";
										const String placeholder_types = "cdfosvxX";
										for (int i = 0; i < line_length - from; i++) {
											if (allowed_chars.contains_char(str[from + i]) &&
													!placeholder_types.contains_char(str[from + i]) &&
													(str[from + i] != end_key[0] || (str[from + i] == end_key[0] && str[from + i - 1] == '\\'))) {