[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67394: 29.1.90; python-ts-mode triple quoted string fill bug
From: |
Eli Zaretskii |
Subject: |
bug#67394: 29.1.90; python-ts-mode triple quoted string fill bug |
Date: |
Thu, 23 Nov 2023 09:00:17 +0200 |
> From: Michael Kleehammer <michael@kleehammer.com>
> Date: Wed, 22 Nov 2023 23:24:19 -0600
>
> Filling a paragraph in a Python triple quoted string does not work in
> python-ts-mode. It does work in python-mode. To reproduce, enter the
> following into the scratch buffer and try to word wrap the triple quoted
> string using M-q in python-mode and python-ts-mode. It word wraps in
> python-mode but not the tree-sitter version.
>
> def test():
> """l
> abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc
> """
> pass
>
> The core issue is in python-syntax-context in the 'triple-quoted-string
> branch of the pcase, python.el:534 in the emacs 29 branch. The code is
> the same in master.
>
> ('triple-quoted-string (and (eq t (nth 3 ppss)) (nth 8 ppss)))
>
> In python-mode (nth 3 ppss) is t, but in python-ts-mode it is 34, which
> is a quote character. I'm pretty new to the tree-sitter code so I
> cannot suggest a fix.
Is this the same as bug#67262? If so, does the change suggested there
fix this issue as well?
Thanks.