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

It seems the format option noLinkBrackets already removed on v8.1.0 #249

Closed
percy507 opened this issue Feb 27, 2022 · 4 comments
Closed

Comments

@percy507
Copy link

As the README says, the option noLinkBrackets will be removed on v9.

But after testing, it seems have been removed on v8.1.0. Well, it's ok on v8.0.0.

@KillyMXI
Copy link
Member

Looks like a bug.
I put the code to handle noLinkBrackets but it doesn't seem to work as expected.

I should've tested it more carefully. Instead, I updated all tests to the new code at once and missed this.

Wonder whether I should really fix it.

@percy507
Copy link
Author

Thanks for this project. It really helpful. 😜

I think it's ok to ignore it. You can focus on the next big version.

This issue can make a hint for someone who face the same question.

@KillyMXI
Copy link
Member

KillyMXI commented Apr 7, 2022

I decided to take another look at this while I'm at it fixing the minimist issue.

Version 9 is getting delayed further more anyway, due to external reasons.

Turns out the issue is a bit more involved and can possibly manifest itself in different situations. So it's good to be fixed.

A merged/deduplicated copy of options.selectors was used as the source for the selectors decision tree but the original with duplicates was not replaced.
Any downstream code should not be concerned about duplication/partial selector definitions. In the version 8.2.0 options.selectors array itself is fully processed and downstream code can see it this way.

@webstech
Copy link
Contributor

webstech commented Jul 5, 2022

Not asking for a change but this patch broke the typescript type definitions test. The test has no format specified:

    tags: {
        a: {
            options: {
                hideLinkHrefIfSameAsText: true,
                linkBrackets: ["[", "]"],
            },
        },

This results in Error: Following selectors have no specified format: 'a'

It previously worked with the default format getting merged but that does not happen now. Also noting that in handleDeprecatedOptions there are a number of checks for the format value that may not have been set yet. Maybe needed a second call to mergeDuplicatesPreferLast after pushing all the tags to selectors.

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

No branches or pull requests

3 participants