예제 #1
0
 public override string ToString()
 {
     var sb = new StringBuilder();
     if (IsConvertExample)
         sb.AppendUnixLine(ParserToken.ConvertExample);
     var nocheckString = IsNoCheck ? " "+ParserToken.NoCheck : "";
     //note that the last line of text will terminate in an endline
     sb.Append(ParserToken.BeginEx + nocheckString + "\n" + Text + ParserToken.EndEx);
     return sb.ToString();
 }
예제 #2
0
 public ExampleBlock(string txt)
     : base(txt)
 {
     var lines = txt.SplitLines();
     var exampleNoMarkup = new StringBuilder();
     foreach (var line in lines)
     {
         if (line.StartsWith(ParserToken.ConvertExample))
             IsConvertExample = true;
         if (line.StartsWith(ParserToken.NoCheck))
             IsNoCheck = true;
         exampleNoMarkup.AppendUnixLine(line);
     }
     Text = exampleNoMarkup.ToString();
 }
예제 #3
0
        public override string ToString()
        {
            var sb = new StringBuilder();
            foreach (var block in MeaningfulBlocks)
            {
                sb.Append(block.ToString());
                if (block != MeaningfulBlocks.Last())
                    sb.AppendUnixLine();
            }

            return sb.ToString();
        }