forked from bartvdbraak/blender
fix for 2 errors in python syntax highlighting, no space was allowed in decorators and decorators where being skipped.
This commit is contained in:
parent
abc5a6c3c8
commit
14ea084580
@ -127,6 +127,10 @@ static int txtfmt_py_find_decorator(const char *string)
|
|||||||
{
|
{
|
||||||
if (string[0] == '@') {
|
if (string[0] == '@') {
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
/* whitespace is ok '@ foo' */
|
||||||
|
while (string[i] == '\t' || string[i] == ' ') {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
while (text_check_identifier(string[i])) {
|
while (text_check_identifier(string[i])) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@ -250,7 +254,7 @@ static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_ne
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Punctuation */
|
/* Punctuation */
|
||||||
else if (text_check_delim(*str)) {
|
else if ((*str != '@') && text_check_delim(*str)) {
|
||||||
*fmt = '!';
|
*fmt = '!';
|
||||||
}
|
}
|
||||||
/* Identifiers and other text (no previous ws. or delims. so text continues) */
|
/* Identifiers and other text (no previous ws. or delims. so text continues) */
|
||||||
|
Loading…
Reference in New Issue
Block a user