Skip to content

Fix text-find-and-replace node to support text-dictionary-new node #560

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

Closed

Conversation

izmp
Copy link

@izmp izmp commented Mar 12, 2025

Description

This PR resolves an issue with the text find and replace by dictionary node where an error occurs when using a dictionary generated by the text-dictionary-new node. The issue was caused by a type mismatch: the find-and-replace node expects Dict[str, List[str]], while the dictionary node generates Dict[str, str].

Workflow

NewDictionaryReplaceProblem_issue
NewDictionaryReplaceProblem_test

Changes

Updated the replacement logic to check if the dictionary value is a list. If it is not a list, the value is used directly.

Note:

English is not my first language, and I used an AI assistant (Copilot) to help compose this Pull Request. I appreciate any suggestions to improve clarity or expression.

@izmp izmp closed this Apr 30, 2025
@izmp izmp deleted the new_dictionary_and_find_replace_problem branch April 30, 2025 07:47
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