示例#1
0
        public void testSplitAnEmbolden()
        {
            Document doc  = NSoup.NSoupClient.Parse("<div>Hello there</div>");
            Element  div  = doc.Select("div").First;
            TextNode tn   = (TextNode)div.ChildNodes[0];
            TextNode tail = tn.SplitText(6);

            tail.Wrap("<b></b>");

            Assert.AreEqual("Hello <b>there</b>", TextUtil.StripNewLines(div.Html())); // not great that we get \n<b>there there... must correct
        }