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: Copy Code Button Generates Incorrectly Formatted README.md Content when copied while in the preview #117

Open
masonthedev opened this issue Oct 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@masonthedev
Copy link

Problem:
When users click the "Copy" button while in the preview, it generates code that's formatted with indentations that displays code rather than the intended formatting when pasted in the README.md file

Steps to Reproduce:

  1. Click the "copy" button in the preview view, code copies with proper formatting when clicked in the markdown view
  2. Paste the copied code into a README.md file on GitHub.
  3. You'll see how the code pastes differently than when its copied and pasted from the markdown view

Actual Behavior:
The copied code has indentations that make it display code rather than the previewed format its supposed to display

Environment:

  • Browser: Chrome 117.0.5938.132

Additional Information:

  • There are no error messages displayed.
  • I was able to manually adjust the formatting, and it displays properly if manually copied from the markdown view but it should work correctly by using the copy button provided
  • The code starts to display weird at the socials section of the code.
  • Below you can see an example of what I mean...

Hi My name is MasonTheDev

Subtitle displays corretly

The Long Description Section is displaying fine

  • 🌍  I'm based in USA
  • 🧠  I'm learning C
  • 🤝  I'm open to collaborating on anything and everything
  • ⚡  Coach by day... Programmer by night### Skills

CJavaScriptHTML5CSS3

              ### Socials
              
              
            <p align="left">
                  <a href="https://discord.com/users/PFranchi" target="_blank" rel="noreferrer">
                <picture>
                <source media="(prefers-color-scheme: dark)" srcset="undefined" />
                <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/discord.svg" />
                <img src="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/discord.svg" width="32" height="32" />
                </picture>
                </a>
                  <a href="https://www.github.com/masonthedev" target="_blank" rel="noreferrer">
                <picture>
                <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/github-dark.svg" />
                <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/github.svg" />
                <img src="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/github.svg" width="32" height="32" />
                </picture>
                </a>
                  <a href="https://www.linkedin.com/in/masonthedev" target="_blank" rel="noreferrer">
                <picture>
                <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/linkedin-dark.svg" />
                <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/linkedin.svg" />
                <img src="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/linkedin.svg" width="32" height="32" />
                </picture>
                </a>
                  <a href="https://www.stackoverflow.com/users/22469991/masonthedev" target="_blank" rel="noreferrer">
                <picture>
                <source media="(prefers-color-scheme: dark)" srcset="undefined" />
                <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/stackoverflow.svg" />
                <img src="https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/socials/stackoverflow.svg" width="32" height="32" />
                </picture>
                </a></p>### Badges<b>My GitHub Stats</b><a
                  href="http://www.github.com/masonthedev"><img src="https://github-readme-stats.vercel.app/api?username=masonthedev&show_icons=true&hide=&count_private=true&title_color=0891b2&text_color=ffffff&icon_color=0891b2&bg_color=1c1917&hide_border=true&show_icons=true" alt="masonthedev's GitHub stats" /></a><a
                  href="http://www.github.com/masonthedev"><img
              src="https://github-readme-streak-stats.herokuapp.com/?user=masonthedev&stroke=ffffff&background=1c1917&ring=0891b2&fire=0891b2&currStreakNum=ffffff&currStreakLabel=0891b2&sideNums=ffffff&sideLabels=ffffff&dates=ffffff&hide_border=true" /></a><a
                  href="http://www.github.com/masonthedev"><img src="https://github-readme-activity-graph.cyclic.app/graph?username=masonthedev&bg_color=1c1917&color=ffffff&line=0891b2&point=ffffff&area_color=1c1917&area=true&hide_border=true&custom_title=GitHub%20Commits%20Graph" alt="GitHub Commits Graph" /></a><a href="https://github.com/masonthedev" align="left"><img src="https://github-readme-stats.vercel.app/api/top-langs/?username=masonthedev&langs_count=10&title_color=0891b2&text_color=ffffff&icon_color=0891b2&bg_color=1c1917&hide_border=true&locale=en&custom_title=Top%20%Languages" alt="Top Languages" /></a>
@danielcranney danielcranney added the bug Something isn't working label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants