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

fix regression of embedlivesample fallback algorithm #4940

Merged
merged 2 commits into from
Nov 15, 2021
Merged

fix regression of embedlivesample fallback algorithm #4940

merged 2 commits into from
Nov 15, 2021

Conversation

escattone
Copy link
Contributor

@escattone escattone commented Nov 11, 2021

Fixes #4883

Testing

I modified files/en-us/web/css/_colon_active/index.md locally. I removed the argument to both of its EmbedLiveSample macro calls (so they both became simply EmbedLiveSample()), and then reloaded http://localhost:5000/en-US/docs/web/css/:active.

// We're here because we can't find the sectionID, so instead we're going
// to find the live-sample iframe by its id (iframeID, NOT sectionID), and
// then collect the closest blocks of code for the live sample.
const result = collectClosestCode(findSectionStart(this.$, iframeID));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This corrects the bug introduced by #4535.

@escattone escattone removed the request for review from wbamberg November 15, 2021 22:44
@escattone
Copy link
Contributor Author

@wbamberg I realize that it's probably unfair to ask you to review the details of this, so removing you as a reviewer, but commenting here just as an FYI.

@escattone escattone merged commit 338ac55 into mdn:main Nov 15, 2021
@escattone escattone deleted the ryan-fix-embedlivesample-fallback branch November 15, 2021 22:45
fiji-flo pushed a commit that referenced this pull request Dec 15, 2021
* fix regression of embedlivesample fallback algorithm

* clone to avoid altering the cheerio DOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EmbedLiveSample macro regression
1 participant