atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

bug: Fix GitHub Markdown for added and deleted resources

Open pauloconnor opened this issue 2 years ago • 4 comments

In https://github.com/runatlantis/atlantis/pull/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 avatar Jul 28 '22 19:07 pauloconnor

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 avatar Jul 28 '22 20:07 jamengual

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

pauloconnor avatar Jul 28 '22 20:07 pauloconnor

I see, yes that could be hard.

jamengual avatar Jul 28 '22 20:07 jamengual

Is there anything else needed on this?

pauloconnor avatar Aug 02 '22 15:08 pauloconnor

This shouldn't be stale.

pauloconnor avatar Sep 05 '22 00:09 pauloconnor