X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/9372dc8510634a37fcd6f7046048c7abf37608e7..c6c8ef76a4d991cd8a7a3b00a816b6db72ecdf04:/black.py diff --git a/black.py b/black.py index 692f6d5..d4b3985 100644 --- a/black.py +++ b/black.py @@ -2082,8 +2082,8 @@ def list_comments(prefix: str, *, is_endmarker: bool) -> List[ProtoComment]: def make_comment(content: str) -> str: """Return a consistently formatted comment from the given `content` string. - All comments (except for "##", "#!", "#:") should have a single space between - the hash sign and the content. + All comments (except for "##", "#!", "#:", '#'", "#%%") should have a single + space between the hash sign and the content. If `content` didn't start with a hash sign, one is provided. """ @@ -2093,7 +2093,7 @@ def make_comment(content: str) -> str: if content[0] == "#": content = content[1:] - if content and content[0] not in " !:#": + if content and content[0] not in " !:#'%": content = " " + content return "#" + content