Skip to content

Doubao-Seed-2.0-Code-2#6

Draft
JiangYongKang wants to merge 2 commits intomasterfrom
Doubao-Seed-2.0-Code-2
Draft

Doubao-Seed-2.0-Code-2#6
JiangYongKang wants to merge 2 commits intomasterfrom
Doubao-Seed-2.0-Code-2

Conversation

@JiangYongKang
Copy link
Copy Markdown
Owner

No description provided.

This commit introduces a new parameter, `protected_words`, to the slugify function, allowing specific words to be retained in the final slug regardless of stopwords. It also updates the CLI to accept this new parameter and includes corresponding unit tests to ensure the feature works as intended. The changes enhance the slugification process by ensuring important terms are not removed during text processing.
This commit introduces several unit tests to validate the behavior of the `slugify` function with respect to protected words. Tests include scenarios for multi-token protected words, non-ASCII characters, Unicode normalization, and handling of maximum length with word boundaries. Additionally, it checks the behavior when no protected words are provided, ensuring consistent slug generation.
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