Fix single-quoted string being badly recongnized as attribute value in XML
Fix #3403
This commit is contained in:
parent
7874f8dab3
commit
cabf726778
@ -50,6 +50,7 @@ vector< pair<int, int> > XmlMatchedTagsHighlighter::getAttributesPos(int start,
|
|||||||
attr_pre_assign,\
|
attr_pre_assign,\
|
||||||
attr_assign,\
|
attr_assign,\
|
||||||
attr_string,\
|
attr_string,\
|
||||||
|
attr_single_quot_string,\
|
||||||
attr_value,\
|
attr_value,\
|
||||||
attr_valid\
|
attr_valid\
|
||||||
} state = attr_invalid;
|
} state = attr_invalid;
|
||||||
@ -99,6 +100,20 @@ vector< pair<int, int> > XmlMatchedTagsHighlighter::getAttributesPos(int start,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '\'':
|
||||||
|
{
|
||||||
|
if (state == attr_single_quot_string)
|
||||||
|
{
|
||||||
|
state = attr_valid;
|
||||||
|
oneMoreChar = 1;
|
||||||
|
}
|
||||||
|
else if (state == attr_key || state == attr_pre_assign || state == attr_value)
|
||||||
|
state = attr_invalid;
|
||||||
|
else if (state == attr_assign)
|
||||||
|
state = attr_single_quot_string;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (state == attr_invalid)
|
if (state == attr_invalid)
|
||||||
|
Loading…
Reference in New Issue
Block a user