internal static FormatParameters CheckCharIsBeginningTag(StringBuilder text, ref int i, ref int removedTagsLength, char tagStartChar, char tagEndChar)
 {
     if (text[i] == tagStartChar && text[i + 1] != '/')
     {
         var styleParam = new FormatParameters(GetTagName(text.ToString(), i, tagEndChar), i, 0);
         removedTagsLength += RemoveTag(ref i, text, tagEndChar);
         return(styleParam);
     }
     return(null);
 }
Esempio n. 2
0
        private int CreateNewSection(bool isNewSection, List <FormatParameters> sections, int currentSectionLength, List <bool> lastFormatersState, List <FormatParameters> currentRange, FormatParameters current, int j)
        {
            if (isNewSection)
            {
                if (sections.Any())
                {
                    sections.Last().Length = currentSectionLength;
                    currentSectionLength = 0;
                }

                var sectionElements = new List <string>();
                for (int k = 0; k < lastFormatersState.Count; k++)
                {
                    if (lastFormatersState[k])
                    {
                        sectionElements.Add(currentRange[k].Tag);
                    }
                }

                sections.Add(new FormatParameters("InterStyle", current.StartIndex + j, 0, sectionElements));
            }
            return(currentSectionLength);
        }