Fix yaml comment indent (#33882)

Closes #33761

The problem was that in the indentation regex we were treating lines
that had `:` in them as requiring an indent on the next line, even if
that `:` was inside a comment.

Release Notes:

- Fixed YAML indentation for lines containing comments with `:` in them
This commit is contained in:
Richard Feldman 2025-07-03 19:57:57 -04:00 committed by GitHub
parent 91bfe6f968
commit 03ca2f4d2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 67 additions and 1 deletions

View file

@ -12,6 +12,6 @@ brackets = [
auto_indent_on_paste = false
auto_indent_using_last_non_empty_line = false
increase_indent_pattern = ":\\s*[|>]?\\s*$"
increase_indent_pattern = "^[^#]*:\\s*[|>]?\\s*$"
prettier_parser_name = "yaml"
tab_size = 2