cherry-markdown
cherry-markdown copied to clipboard
[Feature Request] 开发一个新的搜索组件
Prerequisites
- [x] There isn't an existing issue that requests the same feature, to avoid duplicates.
Clear and concise description of the problem
- 包含现在已有的,搜索,替换(展开/收起)。
- 包含大小写匹配,全子匹配,总共多少项/当前第几项。
- 适配现在的主题功能(以 css val 进行开发)。
当然也可以优先考虑将其独立为单个组件回馈社区。
Suggested solution
No response
Further Information
No response
Contributing
None
可以许愿不🤭,新搜索可以考虑支持 正则搜索、正则替换、在命中处插入光标 等高阶功能
可以许愿不🤭,新搜索可以考虑支持 正则搜索、正则替换、在命中处插入光标 等高阶功能
开发一个新的也挺好的,不过其实我们目前这样也有正则和全词匹配就是了,只是隐藏了相关按钮
// packages/cherry-markdown/src/utils/cm-search-replace.js L148-L150
`<span action="toggleRegexpMode" title="${this.$cherry.locale.regExpSearch}"></span>`, // 正则表达式(未启用)
`<span action="toggleCaseSensitive" class="ace_button" title="${this.$cherry.locale.caseSensitiveSearch}">Aa</span>`, // 大小写不敏感(已启用)
`<span action="toggleWholeWords" title="${this.$cherry.locale.wholeWordSearch}"></span>`, // 全词匹配(未启用)
嗯嗯。之所以打算新弄一个,是因为目前在用的组件是经过N道借鉴而来的。。。当然codemirror最新版也自带了一个官方的searcher,也可以考虑等Cherry更新codemirror最新版后直接用codemirror官方的
@Seeridia 主要是为了避免 license 许可的风险问题, https://github.com/Tencent/cherry-markdown/pull/1345 ,另一方面我们也可以自己高度定制化。
🥰 支持支持!