You have to be careful not to replace every text node that matches the pattern, so test whether it's the first text node in that parent.
您需要注意的是,不要通过替换每个与模式相匹配的文本节点来测试它是否是该父元素中的第一个文本节点。
As I proceed with the examples, I'll highlight whether a given test pattern verifies the crosscutting functionality, the specification, or both.
在完成这个例子的过程中,我将强调给定的测试模式是验证横切功能、规范,还是两者同时验证。
应用推荐