SILUBS.ScriptureChecks.ProcessMatchedPairTokens.RemoveMatchedPunctAtEndOfFirstWordInIntroOutline C# (CSharp) Method

RemoveMatchedPunctAtEndOfFirstWordInIntroOutline() private method

private RemoveMatchedPunctAtEndOfFirstWordInIntroOutline ( ITextToken tok, int i ) : void
tok ITextToken
i int
return void
		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);
		}