SILUBS.ScriptureChecks.ProcessPunctationTokens.ProcessWhitespaceOrParagraph C# (CSharp) Method

ProcessWhitespaceOrParagraph() public method

Add whitespace to the list unless the last item in the list is already whitespace
public ProcessWhitespaceOrParagraph ( bool fIsParaStart ) : void
fIsParaStart bool True for the token to be a paragraph start, false otherwise. ///
return void
		public void ProcessWhitespaceOrParagraph(bool fIsParaStart)
		{
			if (m_puncts.Count > 0 && m_puncts[m_puncts.Count - 1].TokenType == PunctuationTokenType.whitespace)
			{
				if (!m_puncts[m_puncts.Count - 1].IsParaBreak && fIsParaStart)
					m_puncts[m_puncts.Count - 1].IsParaBreak = true;
				return;
			}

			m_puncts.Add(new PunctuationToken(false, false, fIsParaStart));
		}