carbon-app / carbon

:black_heart: Create and share beautiful images of your source code
https://carbon.now.sh
MIT License
34.29k stars 1.9k forks source link

Bug in image after copying from carbon #1522

Open cching-stripe opened 1 month ago

cching-stripe commented 1 month ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

Try the carbon link and you can see the code snippet looks good in carbon. But after copying the image and pasting anywhere (google docs, slack, etc) the image is garbled with the code overlapping.

image

  1. Go to '…'
  2. Click on '…'
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Info (please complete the following information):

Code snippet
  
  
Zopolis4 commented 3 weeks ago

Same issue:

Code:

unless 'URI::HTTPS'.include?(uri.class.to_s)
  puts "#{uri} is a #{uri.class} URI, skipping"
  return false
end
Zopolis4 commented 3 weeks ago

That being said, this issue looks like a duplicate of #743, and the workaround from there (adding whitespace to the end of overlapping lines) worked for me.