Пример #1
0
        public string ReadBlockWithIndent(int indent)
        {
            StringBuilder builder    = new StringBuilder();
            int           blockLevel = Level;

            while (CanRead)
            {
                var line = ReadLine();
                if (Level <= blockLevel)
                {
                    ActualLineIndex--;
                    return(builder.ToString());
                }
                builder.Append(TemplateRendererUtils.CreateIndent(indent));
                builder.Append(line.Substring(blockLevel + 1));
                builder.Append("\n");
            }
            if (builder.Length >= 1)
            {
                builder.Remove(builder.Length - 1, 1);
            }
            return(builder.ToString());
        }