Example #1
0
 public void TestTagProcessor2Tags()
 {
     string html = "1<@code >2</@code>3<@code>4</@code>5";
     TagProcessor tagProcessor = new TagProcessor("@code", html);
     string result = tagProcessor.Replace((openTag, content, closeTag) => { return "(" + content + ")"; });
     Assert.AreEqual("1(2)3(4)5", result);
 }
 private string doProcess(string html)
 {
     TagProcessor tagProcessor = new TagProcessor("@codeblock", html);
     string result = tagProcessor.Replace(this.doReplace);
     //
     if (Globals.OutSettings.DevOutMode)
     {
         result = this.calcExampleProblemsListHtml() + result;
     }
     //
     return result;
 }
        // <@overloads title="get_item_sig()">
        //   <@item title="static get_item_sig(i, arr_depth-opt)">
        //    ...
        //   </@item>
        // </@overloads>


        private string doProcess(string html)
        {
            TagProcessor tagProcessor = new TagProcessor("@overloads", html);
            return tagProcessor.Replace(this.doReplace);
        }
Example #4
0
 public void TestTagProcessorReplace3()
 {
     string html = "1<@code />2<@code>3</@code>";
     TagProcessor tagProcessor = new TagProcessor("@code", html);
     string result = tagProcessor.Replace((openTag, content, closeTag) => { return "()"; });
     Assert.AreEqual("1()2()", result);
 }