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

Add API method to convert redirects based on their name #346

Closed
scripthunter7 opened this issue Jul 31, 2023 · 0 comments
Closed

Add API method to convert redirects based on their name #346

scripthunter7 opened this issue Jul 31, 2023 · 0 comments

Comments

@scripthunter7
Copy link
Member

scripthunter7 commented Jul 31, 2023

In the AST based converter we need a function from the Scriptlets library that can convert redirects by name.
Currently Scriptlets only provide a function that converts the whole rule, but when working with AST this isn't ideal behaviour.

Based on the current approach, I simply recommend the following (just add name word after redirect):

/**
 * Converts a redirect to Adg based on its name, if possible
 *
 * @param name Redirect name to convert
 * @returns Converted Adg compatible redirect name or `undefined` if the redirect isn't supported
 */
convertRedirectNameToAdg(name: string): string | undefined

CC @maximtop @slavaleleka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants