-
Notifications
You must be signed in to change notification settings - Fork 59
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
Added Codepen Support #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anuraghazra!
Thanks for taking your time to implement the CodePen transformer! 🙂
Really awesome work.
I've added some small improvements and better default-values (imo) before this one can be merged.
Could you please add some tests too?
Let me know if you need some further help. 🙂
I hope i'm doing everything correctly, it's my 1st time someone requested a change in my PR. ❤️ |
And for the |
@MichaelDeBoey, added tests. please check if everything is ok. 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anuraghazra!
I've rebased your branch onto upstream
(my repo) and updated the tests.
If the tests are passing, I think this one can be merged 🙂
Okay something is wrong here, i will try to fix the tests and let you know. |
@MichaelDeBoey hopefully everything is all right now? ❤️ |
I think something went wrong when merging on your end. I’ll rebase again and ping you afterwards 😉 |
Co-Authored-By: Michaël De Boey <info@michaeldeboey.be>
Co-Authored-By: Michaël De Boey <info@michaeldeboey.be>
Co-Authored-By: Michaël De Boey <info@michaeldeboey.be>
Co-Authored-By: Michaël De Boey <info@michaeldeboey.be>
@anuraghazra I've rebased your If you need some help, I can give you a clue on how |
Opps, yes i see what happed there, i'm learning a lot from this one PR. yes if you can give some clues that would be great! Thank you very much for this. |
There should be 2 things (3 actually 😛) you need to adjust and then all tests will pass.
If you need any further help, I'm glad to help you get through this one. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anuraghazra Added some tiny nitpicks that I would like to have changed before merging this one.
No problem, just some miscommunication I get it 🙂 |
well i'm really confused with the snapshot stuff. test: expect(html).toMatchInlineSnapshot(
`"<iframe src=\\"https://codepen.io/team/codepen/embed/preview/PNaGbb\\" style=\\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\\"></iframe>"`
); codepen.js return `<iframe src="${iframeUrl}" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"></iframe>`; this this ok? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anuraghazra Like I already said: you don't have to update the snapshot. You have to update the code so the snapshot is correct even tho you're not changing it.
Co-Authored-By: Michaël De Boey <info@michaeldeboey.be>
I also added extra tests for |
okay i think i got the snapshot stuff. okay working on the new tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 small things and this one's good to be merged 🙂
Co-Authored-By: Michaël De Boey <info@michaeldeboey.be>
my bad! fixing (haha silly me, just commited your suggetion directly) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now 🙂
Thanks for all your hard work @anuraghazra! 👊
Yey! THANK YOU VERY MUCH for your patience with this. ❤️ Learned soo much stuff. |
@all-contributors Please add @anuraghazra for code and tests |
I've put up a pull request to add @anuraghazra! 🎉 |
@anuraghazra It was a pleasure to help you get through this one! Glad you learned some things when doing so. 🙂 |
🎉 This PR is included in version 1.3.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Added Codepen support
closes #16
How:
created a new /src/codepen.js file which utilizes
shouldTransform
getHTML
to detect codepen links and embed them into markdown.Checklist:
here's how it looks: (feel free to change the
codepen
link in the docs because i used one of my own pen)