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):
758758 state = 'key' # can be 'key', 'before_value', 'value'
759759 quote_char = None
760760 escape = False
761+ in_dquote = False
761762
762763 def commit ():
763764 nonlocal key , value , state , quote_char
@@ -767,6 +768,7 @@ def commit():
767768 value = ''
768769 state = 'key'
769770 quote_char = None
771+ in_dquote = False
770772
771773 i = 0
772774 while i < len (datasource ):
@@ -791,6 +793,8 @@ def commit():
791793 elif not c .isspace ():
792794 state = 'value'
793795 value += c
796+ if c == '"' :
797+ in_dquote = True
794798
795799 elif state == 'value' :
796800 if escape :
@@ -804,10 +808,12 @@ def commit():
804808 else :
805809 value += c
806810 else :
807- if c .isspace ():
811+ if c .isspace () and not in_dquote :
808812 commit ()
809813 else :
810814 value += c
815+ if c == '"' :
816+ in_dquote = not in_dquote
811817 i += 1
812818
813819 # Final token
You can’t perform that action at this time.
0 commit comments