This patch resolves an issue in yaml-ts-mode where the comment-start-skip value caused some leading '-' characters to remain uncommented when using the comment-or-uncomment-region command on multiple indented YAML blocks. Reproduction steps: 1. Open a YAML file and switch the major mode to yaml-ts-mode. 2. Paste the following into that file: # - name: "Daily: script" # cron: # name: "script" # job: "{{ system_home }}/scripts/script.sh >/dev/null" # minute: "30" # hour: "3" # # - name: "Ensure directories exist" # file: # state: directory # path: "{{ item }}" # mode: '0755' # loop: # - "{{ system_home }}/logs" # - "{{ system_home }}/cache" # - "{{ system_home }}/tmp" # # - name: "Deploy configuration files" # ansible.builtin.template: # dest: "{{ system_home }}/config/{{ item }}" # src: "configs/{{ item }}" # mode: '0644' # loop: "{{ config_files }}" 3. Select the pasted text and invoke `M-x comment-or-uncomment-region`. 4. Issue observed after uncommenting: - name: "Daily: script" cron: name: "script" job: "{{ system_home }}/scripts/script.sh >/dev/null" minute: "30" hour: "3" # - name: "Ensure directories exist" file: state: directory path: "{{ item }}" mode: '0755' loop: - "{{ system_home }}/logs" - "{{ system_home }}/cache" - "{{ system_home }}/tmp" # - name: "Deploy configuration files" ansible.builtin.template: dest: "{{ system_home }}/config/{{ item }}" src: "configs/{{ item }}" mode: '0644' loop: "{{ config_files }}" As demonstrated, some block items starting with '-' remain commented, causing inconsistent comment handling in YAML indented blocks. This patch ensures the entire comment line, including leading '-' characters, is properly toggled by modifying the comment-start-skip regular expression. -- James Cherti GitHub: https://github.com/jamescherti Website: https://www.jamescherti.com/