]> git.madduck.net Git - etc/vim.git/commit

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix a crash on dicts with paren-wrapped long string keys (#3262)
authorYilei "Dolee" Yang <yileiyang@google.com>
Wed, 14 Sep 2022 03:23:51 +0000 (20:23 -0700)
committerGitHub <noreply@github.com>
Wed, 14 Sep 2022 03:23:51 +0000 (23:23 -0400)
commite2adcd7de10eb570987bb894d95f2ff8c8693b9f
tree21134cc7f8325d2e48148a9156e5ec1f69024821
parent72a25591b04b40d1c9b67844120457297c93ecb8
Fix a crash on dicts with paren-wrapped long string keys (#3262)

Fix a crash when formatting some dicts with parenthesis-wrapped long
string keys. When LL[0] is an atom string, we need to check the atom
node's siblings instead of LL[0] itself, e.g.:

    dictsetmaker
      atom
        STRING '"This is a really long string that can\'t be expected to fit in one line and is used as a nested dict\'s key"'
      /atom
      COLON ':'
      atom
        LSQB ' ' '['
        listmaker
          STRING '"value"'
          COMMA ','
          STRING ' ' '"value"'
        /listmaker
        RSQB ']'
      /atom
      COMMA ','
    /dictsetmaker
CHANGES.md
src/black/trans.py
tests/data/preview/long_strings.py