V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
purenothingform

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

  •  
  •   purenothingform · Oct 9, 2022 · 4230 views
    This topic created in 1305 days ago, the information mentioned may be changed or developed.

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

    
    我很 开胃<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 replies    2022-11-09 18:58:14 +08:00
    hqmJoker
        1
    hqmJoker  
       Oct 10, 2022
    说实话没看出来上面和下面有啥区别。

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

    非要替换的话写正则去替换合并
    encro
        2
    encro  
       Nov 9, 2022
    客户端高亮
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5658 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 07:48 · PVG 15:48 · LAX 00:48 · JFK 03:48
    ♥ Do have faith in what you're doing.