瀏覽代碼

HUE-8671 [autocomplete] handle two escape character within quotes (#780)

Xiao Kang 7 年之前
父節點
當前提交
f91ebbb

+ 2 - 2
desktop/core/src/desktop/static/desktop/js/autocomplete/jison/sql.jisonlex

@@ -721,7 +721,7 @@ ROW_NUMBER\s*\(                            { yy.lexer.unput('('); yytext = 'row_
 <backtickedValue>\`                        { this.popState(); return 'BACKTICK'; }
 
 \'                                         { this.begin('singleQuotedValue'); return 'SINGLE_QUOTE'; }
-<singleQuotedValue>(?:\\[']|[^'])+         {
+<singleQuotedValue>(?:\\\\|\\[']|[^'])+         {
                                              if (parser.handleQuotedValueWithCursor(this, yytext, yylloc, '\'')) {
                                                return 'PARTIAL_VALUE';
                                              }
@@ -730,7 +730,7 @@ ROW_NUMBER\s*\(                            { yy.lexer.unput('('); yytext = 'row_
 <singleQuotedValue>\'                      { this.popState(); return 'SINGLE_QUOTE'; }
 
 \"                                         { this.begin('doubleQuotedValue'); return 'DOUBLE_QUOTE'; }
-<doubleQuotedValue>(?:\\["]|[^"])+         {
+<doubleQuotedValue>(?:\\\\|\\["]|[^"])+         {
                                              if (parser.handleQuotedValueWithCursor(this, yytext, yylloc, '"')) {
                                                return 'PARTIAL_VALUE';
                                              }

文件差異過大導致無法顯示
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/autocomplete/sqlAutocompleteParser.js


文件差異過大導致無法顯示
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/autocomplete/sqlSyntaxParser.js


部分文件因文件數量過多而無法顯示