IsIntroductionOutlineStyle() public method

public IsIntroductionOutlineStyle ( string style ) : bool
style string
return bool
Ejemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        ///
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void RemoveMatchedPunctAtEndOfFirstWordInIntroOutline(ITextToken tok, int i)
        {
            if (!m_styleCategorizer.IsIntroductionOutlineStyle(tok.ParaStyleName))
            {
                return;
            }

            // See if we are at the end of the first word
            string[] words     = tok.Text.Split();
            string   firstWord = words[0];

            if (i + 1 != firstWord.Length)
            {
                return;
            }

            int lastFoundPairToken = m_pairTokensFound.Count - 1;

            // If the current matched pair is in an introduction outline,
            // ends the first word, and is a closing punct, remove it.
            if (m_pairList.IsClose(m_pairTokensFound[lastFoundPairToken].Text))
            {
                m_pairTokensFound.RemoveAt(lastFoundPairToken);
            }
        }