diff options
Diffstat (limited to 'source/blender/editors/space_text/text_format_py.c')
-rw-r--r-- | source/blender/editors/space_text/text_format_py.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c index 243e9908fc8..48c522c5e1b 100644 --- a/source/blender/editors/space_text/text_format_py.c +++ b/source/blender/editors/space_text/text_format_py.c @@ -88,8 +88,8 @@ static int txtfmt_py_find_builtinfunc(const char *string) } else if (STR_LITERAL_STARTSWITH(string, "while", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "with", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "yield", len)) { i = len; - } else { i = 0; -} + } else { i = 0; + } /* clang-format on */ @@ -114,10 +114,10 @@ static int txtfmt_py_find_specialvar(const char *string) /* Keep aligned args for readability. */ /* clang-format off */ - if (STR_LITERAL_STARTSWITH(string, "def", len)) { i = len; + if (STR_LITERAL_STARTSWITH(string, "def", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "class", len)) { i = len; - } else { i = 0; -} + } else { i = 0; + } /* clang-format on */ @@ -155,11 +155,11 @@ static int txtfmt_py_find_bool(const char *string) /* Keep aligned args for readability. */ /* clang-format off */ - if (STR_LITERAL_STARTSWITH(string, "None", len)) { i = len; - } else if (STR_LITERAL_STARTSWITH(string, "True", len)) { i = len; - } else if (STR_LITERAL_STARTSWITH(string, "False", len)) { i = len; - } else { i = 0; -} + if (STR_LITERAL_STARTSWITH(string, "None", len)) { i = len; + } else if (STR_LITERAL_STARTSWITH(string, "True", len)) { i = len; + } else if (STR_LITERAL_STARTSWITH(string, "False", len)) { i = len; + } else { i = 0; + } /* clang-format on */ @@ -315,11 +315,11 @@ static char txtfmt_py_format_identifier(const char *str) /* Keep aligned args for readability. */ /* clang-format off */ - if ((txtfmt_py_find_specialvar(str)) != -1) { fmt = FMT_TYPE_SPECIAL; + if ((txtfmt_py_find_specialvar(str)) != -1) { fmt = FMT_TYPE_SPECIAL; } else if ((txtfmt_py_find_builtinfunc(str)) != -1) { fmt = FMT_TYPE_KEYWORD; } else if ((txtfmt_py_find_decorator(str)) != -1) { fmt = FMT_TYPE_RESERVED; - } else { fmt = FMT_TYPE_DEFAULT; -} + } else { fmt = FMT_TYPE_DEFAULT; + } /* clang-format on */ return fmt; @@ -457,10 +457,10 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const bool do_n /* Special vars(v) or built-in keywords(b) */ /* keep in sync with 'txtfmt_py_format_identifier()' */ - if ((i = txtfmt_py_find_specialvar(str)) != -1) { prev = FMT_TYPE_SPECIAL; + if ((i = txtfmt_py_find_specialvar(str)) != -1) { prev = FMT_TYPE_SPECIAL; } else if ((i = txtfmt_py_find_builtinfunc(str)) != -1) { prev = FMT_TYPE_KEYWORD; } else if ((i = txtfmt_py_find_decorator(str)) != -1) { prev = FMT_TYPE_DIRECTIVE; -} + } /* clang-format on */ |