Exemplo n.º 1
0
        public void TestOutputforGetTagAndValue()
        {
            string f       = @"../../abstract-classes2.md";
            string content = File.ReadAllText(f);
            string tag     = "translation.priority.ht";
            string val     = YMLMeister.GetTagAndValue(content, tag);

            Debug.Write(val);

            tag = "ms.author";
            val = YMLMeister.GetTagAndValue(content, tag);
            Debug.Write(val);
        }
Exemplo n.º 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("-------------");
        }