private bool ShouldPrint(TemplateTextOptions templateOption) { switch (templateOption) { case TemplateTextOptions.Always: return(true); case TemplateTextOptions.FirstVerseOfChapter: return(isFirstVerseOfChapter); default: throw new NotImplementedException(); } }
private string AddSuffix(string str, string toFind, string replace, TemplateTextOptions templateOption) { return(Regex.Replace(str, @"\[" + toFind + @"(?::(.*?))?\]", ShouldPrint(templateOption) ? replace + "$1" : "")); }
private bool ShouldPrint(TemplateTextOptions templateOption) => templateOption switch {