public HighlightWordsRule(XElement rule) { Words = new List <string>(); Options = new RuleOptions(rule); var wordsStr = rule.Element("Words")?.Value; if (wordsStr == null) { return; } var words = Regex.Split(wordsStr, "\\s+"); foreach (var word in words) { if (!string.IsNullOrWhiteSpace(word)) { Words.Add(word.Trim()); } } }
public HighlightLineRule(XElement rule) { LineStart = rule.Element("LineStart")?.Value.Trim(); Options = new RuleOptions(rule); }
public AdvancedHighlightRule(XElement rule) { Expression = rule.Element("Expression")?.Value.Trim(); Options = new RuleOptions(rule); }