我有一个场景,我需要将节点拆分为给定的祖先,例如
<strong>hi there, how <em>are <span>you</span> doing</em> today?</strong>
Run Code Online (Sandbox Code Playgroud)
需要分成:
<strong>hi there, how <em>are <span>y</span></em></strong>
Run Code Online (Sandbox Code Playgroud)
和
<strong><em><span>ou</span> doing</em> today?</strong>
Run Code Online (Sandbox Code Playgroud)
我该怎么做呢?