all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: hello@mattplm.fr
Cc: 59679@debbugs.gnu.org
Subject: bug#59679: 29.0.50; python + tree-sitter: Syntax highlighting is sometimes wrong with multi line docstrings
Date: Wed, 30 Nov 2022 02:31:54 -0800	[thread overview]
Message-ID: <0A5115A2-73B2-41E1-9209-F4E6372AC8A2@gmail.com> (raw)
In-Reply-To: <d87a046f-ee8c-0a1c-2a12-a5f033a3f3e7@mattplm.fr>


Matthias Paulmier <hello@mattplm.fr> writes:

> Steps to reproduce:
> - emacs -Q
> - find-file "foo.py"
> - write the following file
>
> ```
> def test():
>      '''This is a function
>
>      It just does nothing and it's ok.
>      '''
>      pass
> ```
> - at this point, syntax highlighting should be good
> - kill-buffer
> - find-file "foo.py"
> - syntax highlighting doesn't show properly (comment ends after "it'"
> and pass is shown with the `font-lock-doc-face')

Hmmm, it seems the tabs in the code throws tree-sitter off and makes it
parse incorrectly. But I’m not sure if the tabs are in your code or they
are added by the email provider. Do you expect the code to contain tabs?

Yuan





  reply	other threads:[~2022-11-30 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 12:05 bug#59679: 29.0.50; python + tree-sitter: Syntax highlighting is sometimes wrong with multi line docstrings Matthias Paulmier
2022-11-30 10:31 ` Yuan Fu [this message]
2022-11-30 11:06   ` Matthias Paulmier
2022-11-30 16:50     ` Matthias Paulmier
2022-12-02  5:08 ` Yuan Fu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0A5115A2-73B2-41E1-9209-F4E6372AC8A2@gmail.com \
    --to=casouri@gmail.com \
    --cc=59679@debbugs.gnu.org \
    --cc=hello@mattplm.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.