merge a node cotent with same color into a span