V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
purenothingform
V2EX  ›  Elasticsearch

求教,是否可以把所有高亮的结果合并成一個结果?

  •  
  •   purenothingform · 2022-10-09 21:18:19 +08:00 · 1431 次点击
    这是一个创建于 536 天前的主题,其中的信息可能已经有所发展或是发生改变。

    例如将以下三条结果合并为后者

    
    我很 开胃<span style='background-color:greenyellow'>健脾</span>补元气
    
    <span style='background-color:greenyellow'>我</span>很 开胃健脾补元气```
    
    
    ```<span style='background-color:greenyellow'>我</span>很 <span style='background-color:greenyellow'>开胃</span><span style='background-color:greenyellow'>健脾</span>补元气```
    
    还是只能自己实现?
    2 条回复    2022-11-09 18:58:14 +08:00
    hqmJoker
        1
    hqmJoker  
       2022-10-10 18:05:55 +08:00
    说实话没看出来上面和下面有啥区别。

    按我理解合并样式直接定义一个 class ,然后绑定就行。

    非要替换的话写正则去替换合并
    encro
        2
    encro  
       2022-11-09 18:58:14 +08:00
    客户端高亮
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5310 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:00 · PVG 14:00 · LAX 23:00 · JFK 02:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.