public bool IsKeyword(string value, out Keyword keyword) { return(_keywords.TryGetValue(value.ToLower(), out keyword)); }
public string Decorate(Keyword keyword, string decorated, string word) { return($"[{keyword.Highlighter}]{decorated}[{keyword.Highlighter}]"); }
public string Decorate(Keyword keyword, string decorated, string word) { return(keyword.Style == "bold" ? $"[{keyword.Style}]{decorated}[{keyword.Style}]" : decorated); }
private string Decorate(Keyword keyword, string word) { return(_decoraters.Aggregate(word, (current, decorater) => decorater.Decorate(keyword, current, word))); }