Closed yanneves closed 3 years ago
Really nice, thanks for that contribution! Will have a more thorough look into it next week.
I've got a release coming up in the next couple days that depends on this fix - is there anything I can do to help get this merged?
Thanks so much 👍
Corresponding npm package will be published tomorrow.
Published on npm!
Adds tests for this package and removes lodash dependency
I had an issue where even though my Ghost instance is configured with
https://example.com
with no trailing slash, the settings value in Gatsby would include a trailing slash. This package would then compare usingcmsUrl = 'https://example.com//'
and fail to replace links.While the settings value in Gatsby should not include a trailing slash, this package could be more resilient and compare urls via the url module instead of relying on only comparing strings. So I've contributed this refactor / fix with tests.