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 shape.id.separator regression #745

Merged
merged 10 commits into from
Oct 31, 2022
Merged

Fix shape.id.separator regression #745

merged 10 commits into from
Oct 31, 2022

Conversation

sfe-efficy
Copy link
Contributor

@sfe-efficy sfe-efficy commented Oct 29, 2022

Hi!

I created a fork to fix the problem reported here: #740

Regards

Fixes #740

@XhmikosR XhmikosR changed the title Fix about issue 740 Fix shape.id.separator regression Oct 29, 2022
@XhmikosR XhmikosR requested a review from Kreeg October 29, 2022 12:47
@XhmikosR XhmikosR added the bug label Oct 29, 2022
lib/svg-sprite/shape.js Outdated Show resolved Hide resolved
@XhmikosR
Copy link
Member

I'll try to backport this and cut a patch release because on main we have dropped Node.js 12 support.

@XhmikosR XhmikosR merged commit 728da48 into svg-sprite:main Oct 31, 2022
XhmikosR added a commit that referenced this pull request Oct 31, 2022
* Fix: Keep using relative path to generate a valid ID with the folder names in the relative path.

* Fix: Taking care if no base path is defined

* Add test

* Add test to validate the correct relative path.
Set correct order for testing

* Update shape.js

* Remove test for relative content.
Configure relative content from base and full paths, it's a calculated value.

* Update shape.constructor.test.js

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Andrew <1666622+Kreeg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: 2.0.0: shape.id.separator does not produce an id with the parent directory names
3 participants