示例#1
0
        public void TestSuffix()
        {
            string f       = @"../../abstract-classes3.md";
            string content = File.ReadAllText(f);
            string tag     = "ms.author";

            Debug.WriteLine("-----Suffix for ms.author-----");
            string result = YMLMeister.GetSuffix(content, tag);

            Debug.Write(result);
            Debug.WriteLine("-------------");
        }
示例#2
0
        public void TestPrefixTagSuffix()
        {
            string f       = @"../../abstract-classes3.md";
            string content = File.ReadAllText(f);
            string tag     = "ms.author";

            Debug.WriteLine("-----Prefix tag suffix for ms.author-----");
            string        prefix    = YMLMeister.GetPrefix(content, tag);
            string        tagAndval = YMLMeister.GetTagAndValue(content, tag);
            string        suffix    = YMLMeister.GetSuffix(content, tag);
            StringBuilder sb        = new StringBuilder();

            sb.Append(prefix).Append(tagAndval).Append(suffix);
            Debug.Assert(sb.ToString().Length == content.Length);
            Debug.Write(prefix + tagAndval + suffix);
            Debug.WriteLine("-------------");
        }