Skip to content

Commit

Permalink
fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyq0826 committed Jan 25, 2017
1 parent e991b4c commit 294bdf3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions markdown_css/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import logging
from collections import defaultdict
from cssutils import CSSParser
from cssutils.css import CSSComment


# version is a human-readable version number.

Expand Down Expand Up @@ -52,6 +54,9 @@ def parse_style(cssText):

# init all selector
for r in cssStyle:
if isinstance(r, CSSComment):
continue

# skip * selector
if r.selectorText.find('*') >= 0:
continue
Expand All @@ -69,6 +74,9 @@ def append_all_selector(style):

element_list = []
for r in cssStyle:
if isinstance(r, CSSComment):
continue

if r.selectorText.find('*') >= 0 and r.selectorText.find(':') < 0:
append_all_selector(to_inline_style(r.style))
continue
Expand Down
3 changes: 2 additions & 1 deletion themes/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
color:#3e3e3e;
}

/*comment*/
p{
letter-spacing: 1px !important;
line-height: 1.7 !important;
Expand Down Expand Up @@ -85,4 +86,4 @@ hr {
pre {
background: #f2f2f2 !important;
padding: 12px 13px;
}
}

0 comments on commit 294bdf3

Please sign in to comment.