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

feat (searcher): 增加 searchEntryConfig.area 禁用功能、keyAutoMatch 正则 Unicode 支持 #1860

Merged
merged 2 commits into from
May 14, 2024

Conversation

davidxuang
Copy link
Contributor

@davidxuang davidxuang commented May 11, 2024

Closes #1815.
#1814 的前置 PR。

按先前讨论,拟藉由 searchEntryConfig.area 实现目标功能,包括:

  • 增加一处为站点禁用所有 searchEntryConfig.area 的选项;
  • keyAutoMatch 正则增加 u flag,启用 Unicode 支持(caniuse);
  • searchEntryConfig.area 替换后的搜索词打印到控制台。

拟适配的站点 config:https://github.com/pt-plugins/PT-Plugin-Plus/pull/1814/files#diff-087d488ae0e58fb2df083615e0c83397dd5e7e1a22fef8f69075f176b758718fR15

@davidxuang davidxuang marked this pull request as ready for review May 11, 2024 14:28
@davidxuang davidxuang mentioned this pull request May 11, 2024
Copy link
Collaborator

@IITII IITII left a comment

Choose a reason for hiding this comment

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

  1. 这个命名怎么是 搜索域? 从功能上理解的话应该是 启用关键词精确匹配
  2. 设置界面, 关键词替换日志, 统一关键词开启关闭 关键词精确匹配 的 对比截图
  3. 空格 之类的 code style 的修改撤回. 每个人 code style 不一样, diff 看起来太费劲了

@davidxuang
Copy link
Contributor Author

  1. 这个命名怎么是 搜索域? 从功能上理解的话应该是 启用关键词精确匹配

确实,不过这是按照 area 挪过来的,这个命名本身对于这个功能来说范围太小了。改成“替换”了,“精确匹配”听上去是 Google 加双括号的那个功能。

@davidxuang
Copy link
Contributor Author

图片

Sample: should transform

Enabled

图片
图片

Disabled

图片

Sample: should not transform

图片
图片

@IITII IITII merged commit 1511135 into pt-plugins:dev May 14, 2024
4 checks passed
trim21 pushed a commit to trim21/PT-Plugin-Plus that referenced this pull request May 19, 2024
* feat: 启用 `searchEntryConfig.area.keyAutoMatch` 正则 Unicode 支持

* feat: 增加禁用 `searchEntryConfig.area` 选项
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.

None yet

2 participants