GNU bug report logs - #67262
python-ts-mode cannot identify triple-quoted-strings

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Sat, 18 Nov 2023 15:53:02 UTC

Severity: normal

Merged with 67394

Found in version 29.1.90

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #79 received at 67262 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Yuan Fu <casouri <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 67262 <at> debbugs.gnu.org,
 JD Smith <jdtsmith <at> gmail.com>
Subject: Re: bug#67262: python-ts-mode cannot identify triple-quoted-strings
Date: Sun, 24 Dec 2023 02:45:25 +0200
On 24/12/2023 01:51, Yuan Fu wrote:
> Something like this? IMHO the code is easier to understand without the syntax-propertize-rules.

Sure, fine with me.

> +    (while (search-forward "\"\"\"" end t)+            (put-text-property (1- start) start

I think we also should support the triple-single-quotes, like 
python-syntax-propertize-function does.

> +                               'syntax-table (string-to-syntax "| "))
> +            (put-text-property end (min (1+ end) (point-max))
> +                               'syntax-table (string-to-syntax "| "))))))))

The spaces after "|" seem unnecessary.




This bug report was last modified 1 year and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.