Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

solved #274 review youtube embed handling #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shibasisp
Copy link

is this okay?

@shibasisp
Copy link
Author

can anyone please tell me what is the problem? Why the tests are failing?

@revin
Copy link
Collaborator

revin commented Oct 26, 2016

Hey @shibasisp, that was quick! Fantastic!

Guess what? I totally forgot to list that we have unit tests around this as well, and for TravisCI to pass the PR, the youtube unit tests need to be removed as well. Oops. Those are in the test directory.

However, @ashleygwilliams brought up a good point in #274, that the ideal outcome here might be different than just removing the youtube stuff, because there are definitely users (the npm site, at least) that need it. So if you don't mind, I have to hang on to this until she's able to investigate a bit more and we can decide where the youtube processing stuff needs to live.

@shibasisp
Copy link
Author

Ok fine..

@ashleygwilliams
Copy link
Contributor

hi! so yes- until i can completely move the npm docs off of marky-markdown (it's in the plan, just not a priority at the moment) we'll need to keep this functionality. that being said, because it is not inline with the product direction of parity with github-flavored markdown, i would be happy to see it moved behind a flag as part of the deprecation path! cc/@revin

@revin
Copy link
Collaborator

revin commented Oct 26, 2016

That sounds good. So @shibasisp does that sound interesting to you? Basically add an option in index.js, say, allowDeprecatedYoutubeEmbeds: false (unless you have any particular preference for the name, @ashleygwilliams), and only .use(youtube) in render.js if the option is true, similar to how the syntax highlighting and CDN things work.

Then instead of removing the tests, they'd need updated so the current tests pass if the option is set to true, and add some new tests to verify that the <iframe>s are stripped out when the option is set to false or omitted.

Is that enough information for you to know what changes to make? I'm totally happy to help if anything is confusing. 👍

@ashleygwilliams
Copy link
Contributor

no preference on name for the flag!

@revin
Copy link
Collaborator

revin commented Nov 7, 2016

Hey again @shibasisp, do you have the time/availability to implement the version of this where it's deprecated and not removed entirely? If not, I can take over from here if you like. No pressure. Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants