Skip to content

Commit

Permalink
Support updating version comments following quoted YAML strings
Browse files Browse the repository at this point in the history
Fixes #8125
  • Loading branch information
kurtmckee committed Oct 16, 2023
1 parent 22efed1 commit 9a01d01
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def updated_workflow_file_content(file)
updated_content =
updated_content
.gsub(
/(?<=\W|"|')#{Regexp.escape(old_declaration)}(?<comment>\s+#.*)?(?=\s|"|'|$)/
/(?<=\W|"|')#{Regexp.escape(old_declaration)}["']?(?<comment>\s+#.*)?(?=\s|$)/
) do |match|
comment = Regexp.last_match(:comment)
match.gsub!(old_declaration, new_declaration)
Expand Down

0 comments on commit 9a01d01

Please sign in to comment.