Exemplo n.º 1
0
        internal override void ParseStyle(HtmlNode node)
        {
            HtmlStyle value;

            Dictionary<string, string> styles = new Dictionary<string, string>();
            KeyValuePair<Stack<string>, Stack<string>> styleStack =
                new KeyValuePair<Stack<string>, Stack<string>>(new Stack<string>(), new Stack<string>());

            if (node.TryGetStyle(font, out value))
            {
                if (ProcessFontStyle(value.Value, styles, styleStack))
                {
                    foreach (var style in styles)
                    {
                        if (!node.HasStyle(style.Key))
                        {
                            node.HtmlStyles.Add(new HtmlStyle(style.Key, style.Value, false));
                        }
                    }

                    node.RemoveStyle(font);
                }
            }
        }