char[] templateText = txt.ToCharArray();
//ITemplate it = new CleanTemplate();
List<Tag> tags = new List<Tag>();
char[] temp = new char[100];
for (int i = 0; i < templateText.Length; i++)
{
if (templateText[i] == '{')
{
if (i > 0 && templateText[i - 1] == '\\')
continue;
Tag tag = new Tag();
tag.StartIndex = i;
context.Response.Write(templateText[i]);
while (++i < templateText.Length && templateText[i] != '}')
{
if (templateText[i] == ' ')
{
if (isFirstSpace)
{
isFirstSpace = false;
context.Response.Write(" ");
}
continue;
}
context.Response.Write(templateText[i]);
}
tag.EndIndex = i;
context.Response.Write(templateText[i]);
context.Response.Write("<br />");
}
isFirstSpace = true;
}
//ITemplate it = new CleanTemplate();
List<Tag> tags = new List<Tag>();
char[] temp = new char[100];
for (int i = 0; i < templateText.Length; i++)
{
if (templateText[i] == '{')
{
if (i > 0 && templateText[i - 1] == '\\')
continue;
Tag tag = new Tag();
tag.StartIndex = i;
context.Response.Write(templateText[i]);
while (++i < templateText.Length && templateText[i] != '}')
{
if (templateText[i] == ' ')
{
if (isFirstSpace)
{
isFirstSpace = false;
context.Response.Write(" ");
}
continue;
}
context.Response.Write(templateText[i]);
}
tag.EndIndex = i;
context.Response.Write(templateText[i]);
context.Response.Write("<br />");
}
isFirstSpace = true;
}