]> 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:

Possible fix for issue with indentation and fmt: skip (#2281)
authorSergey Vartanov <me@enzet.ru>
Tue, 8 Jun 2021 21:37:34 +0000 (00:37 +0300)
committerGitHub <noreply@github.com>
Tue, 8 Jun 2021 21:37:34 +0000 (14:37 -0700)
commit40fae18134916b8499bd992d8bef4ae23bcd2986
treeae4fa0440407b0bb3c04168fda1b12fb1b6203ad
parentc1c2418368cfcaa4f49edd7ec599fa45cce2d47d
Possible fix for issue with indentation and fmt: skip (#2281)

Not sure the fix is right.  Here is what I found: issue is connected
with line

    first.prefix = prefix[comment.consumed :]

in `comments.py`.  `first.prefix` is a prefix of the line, that ends
with `# fmt: skip`, but `comment.consumed` is the length of the
`"  # fmt: skip"` string.  If prefix length is greater than 14,
`first.prefix` will grow every time we apply formatting.

Fixes #2254
CHANGES.md
src/black/comments.py
tests/data/fmtskip6.py [new file with mode: 0644]
tests/test_format.py