SILUBS.ScriptureChecks.QTokenProcessor.GetContinuersNeeded C# (CSharp) Method

GetContinuersNeeded() private method

Processes paragraph-start tokens encountered and returns a list of the continuers that should follow the marker, based on the marker, the currently open quotes, and the quotation categorizer settings.
private GetContinuersNeeded ( string styleName, string prevStyleName, int level ) : List
styleName string The style being checked in the token for whether it should have /// continuers
prevStyleName string Name of the prev style.
level int The current level
return List
		private List<string> GetContinuersNeeded(string styleName, string prevStyleName,
			int level)
		{
			List<string> continuers = new List<string>();

			// Check if the quotation categorizer is set to continue at this style
			// or when it follows the previous style.
			if (!m_qmCategorizer.CanStyleContinueQuotation(styleName, prevStyleName) ||
				level < 1)
			{
				return continuers;
			}

			ParagraphContinuationType paraCont = m_qmCategorizer.ContinuationType;

			if (paraCont == ParagraphContinuationType.None)
				return continuers;

			if (paraCont == ParagraphContinuationType.RequireOutermost)
				continuers.Add(m_qmCategorizer.GetContinuationMarkForLevel(1));
			else if (paraCont == ParagraphContinuationType.RequireInnermost)
				continuers.Add(m_qmCategorizer.GetContinuationMarkForLevel(level));
			else
			{
				for (int i = 1; i <= level; i++)
					continuers.Add(m_qmCategorizer.GetContinuationMarkForLevel(i));
			}

			return continuers;
		}