Files
neovim/runtime
github-actions[bot] 21b21b94e6 fix(comment): fall back to using trimmed comment markers (#28950)
fix(comment): fall back to using trimmed comment markers (#28938)

Problem: Currently comment detection, addition, and removal are done
  by matching 'commentstring' exactly. This has the downside when users
  want to add comment markers with space (like with `-- %s`
  commentstring) but also be able to uncomment lines that do not contain
  space (like `--aaa`).

Solution: Use the following approach:
  - Line is commented if it matches 'commentstring' with trimmed parts.
  - Adding comment is 100% relying on 'commentstring' parts (as is now).
  - Removing comment is first trying exact 'commentstring' parts with
    fallback on trying its trimmed parts.
(cherry picked from commit 0a2218f965)

Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2024-05-23 16:02:13 -05:00
..
2024-05-14 08:27:17 +02:00
2024-04-27 11:01:14 +02:00
2024-05-14 08:27:30 +02:00
2023-11-05 21:56:56 +01:00
2024-02-16 08:57:45 +01:00
2024-03-24 10:32:07 +01:00
2024-05-18 07:53:42 +00:00
2024-05-05 23:22:11 +02:00
2024-05-14 08:27:17 +02:00
2022-08-20 10:04:55 +02:00
2024-03-28 09:32:32 +08:00
2024-02-01 12:06:55 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-24 11:33:06 +09:00
2024-03-14 15:04:31 +08:00
2024-05-16 14:34:32 +02:00