File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -758,6 +758,7 @@ def extract_datasource_filter(match):
758
758
state = 'key' # can be 'key', 'before_value', 'value'
759
759
quote_char = None
760
760
escape = False
761
+ in_dquote = False
761
762
762
763
def commit ():
763
764
nonlocal key , value , state , quote_char
@@ -767,6 +768,7 @@ def commit():
767
768
value = ''
768
769
state = 'key'
769
770
quote_char = None
771
+ in_dquote = False
770
772
771
773
i = 0
772
774
while i < len (datasource ):
@@ -791,6 +793,8 @@ def commit():
791
793
elif not c .isspace ():
792
794
state = 'value'
793
795
value += c
796
+ if c == '"' :
797
+ in_dquote = True
794
798
795
799
elif state == 'value' :
796
800
if escape :
@@ -804,10 +808,12 @@ def commit():
804
808
else :
805
809
value += c
806
810
else :
807
- if c .isspace ():
811
+ if c .isspace () and not in_dquote :
808
812
commit ()
809
813
else :
810
814
value += c
815
+ if c == '"' :
816
+ in_dquote = not in_dquote
811
817
i += 1
812
818
813
819
# Final token
You can’t perform that action at this time.
0 commit comments