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

Fixes #3259 #3860

Merged
merged 3 commits into from
Mar 12, 2023
Merged

Fixes #3259 #3860

merged 3 commits into from
Mar 12, 2023

Conversation

emmebi
Copy link
Collaborator

@emmebi emmebi commented Mar 11, 2023

Changed all the regular expression related to MacroLinkFunction class to directly match the longest possible path in the macro path.

Identify the Bug or Feature request

Fixes #3259

Description of the Change

The regular expressions used to parse the macro links didn't cope with the possibility to have forward slashes (/) in the name of the macro. With the adds-on this is now a possibility, so I am extending the macro to match as much as possible in the macro URL to include also the folder names.

I have added some test cases to test for possible cases. The tests are driven by a couple of CSV files, so if more test cases are needed, it should be easy to add them.

Possible Drawbacks

There could be other parts of the code which rely on the fact that there are no slashes in the macro name; while I tried to check all the patterns which could be relevant, it's entirely possible that I missed some.

Documentation Notes

N/A

Release Notes

  • Fixed a limitation in add-ons which prevented macros to be in subfolders when used as macro links

This change is Reviewable

emmebi and others added 3 commits March 11, 2023 15:25
Changed all the regular expression related to MacroLinkFunction class
to directly match the longest possible path in the macro path.
Copy link
Contributor

@Phergus Phergus left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @emmebi)

@Phergus Phergus merged commit 4f22f04 into RPTools:develop Mar 12, 2023
@cwisniew cwisniew added the bug label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

[Bug]: impossible to reference macros in subdirectories of addon with macro links
3 participants