Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Fix GitHub Markdown for added and deleted resources #2418

Merged

Conversation

pauloconnor
Copy link
Contributor

@pauloconnor pauloconnor commented Jul 28, 2022

In #2337, I modified the GitHub Markdown regex to correctly handle YAML in the Terraform output. Unfortunately, that broke highlighting for resources that were being created or deleted. The updated regex will now also accept an = sign with spaces either side. It might incorrectly highlight some plain text in plans, but it should fix the error.

Closes #2425

@pauloconnor pauloconnor requested a review from a team as a code owner July 28, 2022 19:53
@jamengual jamengual added the bug Something isn't working label Jul 28, 2022
@jamengual
Copy link
Contributor

can you test to make sure this is not a common thing It might incorrectly highlight some plain text in plans, but it should fix the error.
thanks

@jamengual jamengual added the waiting-on-response Waiting for a response from the user label Jul 28, 2022
@pauloconnor
Copy link
Contributor Author

can you test to make sure this is not a common thing It might incorrectly highlight some plain text in plans, but it should fix the error. thanks

Not really. Consider if someone is adding some yaml to a Helm chart. The content of that yaml could be anything, so something like

   ~ values                     = [
      + <<-EOT
           image:
             file: | 
               - foo = bar

would result in - foo = bar being changed into a minus diff in the markdown, similar to how it was previous to #2337. I'm not sure how common that particular edge case would be, or what's the best approach to fixing it

@jamengual
Copy link
Contributor

I see, yes that could be hard.

@pauloconnor
Copy link
Contributor Author

Is there anything else needed on this?

@github-actions github-actions bot added the Stale label Sep 3, 2022
@pauloconnor
Copy link
Contributor Author

This shouldn't be stale.

@github-actions github-actions bot removed the Stale label Sep 5, 2022
@runatlantis runatlantis deleted a comment from github-actions bot Sep 5, 2022
@jamengual jamengual merged commit 4143c87 into runatlantis:master Sep 8, 2022
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
…#2418)

* bug: Fix GitHub Markdown for added and deleted resources

* Fix spacing in test
@nitrocode nitrocode added this to the v0.19.9 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-on-response Waiting for a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

github highlighting broken in 0.19.7
3 participants