fixed mixed quoting bug

This commit is contained in:
anon
2023-11-19 22:43:56 +01:00
parent a4c2bfb3d7
commit 0901cac2d1

View File

@ -11,6 +11,7 @@ bool is_comment_multiline;
std::string current_tag;
unsigned xml_tag_stack = 0;
bool is_asymmetric;
char current_string_quote;
unsigned long long cursor_position = 0;
#define YY_USER_ACTION cursor_position += yyleng;
@ -138,6 +139,7 @@ identifier [A-z!][A-z0-9]*
<TAG>{
\"|\' {
current_string_quote = yytext[0];
BEGIN STRING;
}
= {
@ -183,8 +185,12 @@ identifier [A-z!][A-z0-9]*
<STRING>{
[^\\]\"|\' {
ECHOC(yytext[0]);
BEGIN TAG;
if (current_string_quote == yytext[1]) {
ECHOC(yytext[0]);
BEGIN TAG;
} else {
ECHO;
}
}
, {
ECHOS("\\,");