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

Simplify html filters usage #12

Merged
merged 6 commits into from
Aug 6, 2024
Merged

Conversation

chrmod
Copy link
Collaborator

@chrmod chrmod commented Aug 5, 2024

This change aims to hide the complexity of different types of html filters from the users - so changes to public interfaces were removed.
Additionally support for logging and exception handling was added.


callerContext?: any | undefined;
}): HTMLSelector[] {
public getHtmlFilters(request: Request): HTMLSelector[] {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

wonder if this is an actually breaking change

Comment on lines +13 to +17
export type HTMLModifier = readonly [RegExp, string];

export type HTMLSelector =
| readonly ['script', readonly string[]]
| readonly ['replace', HTMLModifier];
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about we rename HTMLModifier with HTMLReplacer ?

@chrmod chrmod merged commit fb82f74 into support-replace-mod Aug 6, 2024
0 of 4 checks passed
@chrmod chrmod deleted the replace-single-type branch August 6, 2024 11:31
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

Successfully merging this pull request may close these issues.

1 participant