Ejemplo n.º 1
0
        private string Hilight(Dictionary <string, string> args)
        {
            Regex     regex   = new Regex(args["hilight"]);
            Highlight hilight = new Highlight();

            if (args.ContainsKey("bg"))
            {
                hilight.Background = Highlight.ParseColor(args["bg"]);
            }
            if (args.ContainsKey("fg"))
            {
                hilight.Foreground = Highlight.ParseColor(args["fg"]);
            }
            if (args.ContainsKey("st"))
            {
                hilight.Style = Highlight.ParseStyle(args["st"]);
            }
            if (args.ContainsKey("wt"))
            {
                hilight.Weight = Highlight.ParseWeight(args["wt"]);
            }

            Highlighter.Add(regex, hilight);

            return("");
        }