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(gatsby-source-wordpress): HTML image regex's #29778

Merged
merged 4 commits into from
Feb 26, 2021

Conversation

TylerBarnes
Copy link
Contributor

The regex's used to find img tags in html fields were changed to match eslint rules but that change broke the matches for certain situations (but not the ones in our tests 😢). This PR reverts those changes, matches any special character in URL's (instead of just URL-safe characters), and adds a unit test for 2 of our html regex's.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 25, 2021
@TylerBarnes TylerBarnes added topic: source-wordpress Related to Gatsby's integration with WordPress and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 25, 2021
Copy link
Contributor

@sslotsky sslotsky left a comment

Choose a reason for hiding this comment

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

I'm very glad for the tests because I'm not about to pretend to parse all this regex 😂

@TylerBarnes TylerBarnes merged commit f6edccf into master Feb 26, 2021
@TylerBarnes TylerBarnes deleted the fix/wp-html-image-regexes branch February 26, 2021 18:46
vladar pushed a commit that referenced this pull request Feb 27, 2021
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit f6edccf)
vladar pushed a commit that referenced this pull request Feb 27, 2021
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit f6edccf)

Co-authored-by: Tyler Barnes <tyler@gatsbyjs.com>
ascorbic pushed a commit that referenced this pull request Mar 1, 2021
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit f6edccf)
ascorbic pushed a commit that referenced this pull request Mar 1, 2021
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
(cherry picked from commit f6edccf)

Co-authored-by: Tyler Barnes <tyler@gatsbyjs.com>
@TylerBarnes
Copy link
Contributor Author

TylerBarnes commented Mar 1, 2021

This is released in gatsby-source-wordpress@4.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-wordpress Related to Gatsby's integration with WordPress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants