Julien Castiaux <julien.casti...@gmail.com> added the comment:

Hello David,

I'm working in the same company as Baptiste and I'm trying to solve the 
problem. The issue is indeed related to the folding algorithm, the DBQUOTE 
character is lost in the parse_tree AST thus when the folding algo split the 
children to find a sweat spot to split the line it doesn't re-introduce the 
DBQUOTE and instead inject the content of the BareQuotedString right away.

I'm working on a fix which consist of adding two DBQUOTE, one at the beginning 
and one at the end, of the BareQuotedString token when it is created 
(_header_value_parser.py@get_bare_quoted_string()). I was inspired by how the 
angles < and > are injected around the AddrSpec token in a AngleAddr token.

Right now my fix isn't correct, there are some unittest falling. I'm trying to 
get it working and hopefully get back to you with a nice pull-request :)

Regards,
Julien

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44637>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to