makrdown-css
Markdown css is a command tool to convert css style into markdown inline style.
Theme Demo
Install
maxOS
xcode-select --install
pip install markdown-css
linux
apt-get install libxml2-dev libxslt1-dev python-dev
apt-get install python-lxml
pip install markdown-css
Getting started
pip install markdown-css
mkdir public
touch style.css
markdown -h
markdown-css markdown.html --style=style.css --out=public
Themes
https://github.com/wecatch/markdown-css/tree/master/themes
Demo
git clone https://github.com/wecatch/markdown-css.git
cd themes
markdown-css markdown.html --style=simple.css --out=public
Selector
markdown-css support css selector like these:
element selector
p {
margin: 10px 0;
}
multi element selector
h1,p,h2,pre {
color: #333;
}
all element
* {
font-size: 14px
}
pseudo-selector
h1:before {
content: '#'
}
child element seletor
blockquote p {
color:#888;
}
Pseudo-selector can't be used in inline-style, these selectos are write into
Pseudo Class can't copy to WeChat Edit
I use markdown-css, and I found the html is appear well, but when I copy the html into Wechat Edit, all the Pseudo Class is disappear. Is there any solution?
lxml.etree.XMLSyntaxError: None
markdown-css test.html --style=style.css --out=public Traceback (most recent call last): File "/usr/local/bin/markdown-css", line 72, in
main(input_file, out, style, name)
File "/usr/local/bin/markdown-css", line 30, in main
html = PyQuery(content)
File "/usr/local/lib/python2.7/dist-packages/pyquery/pyquery.py", line 226, in init
elements = fromstring(context, self.parser)
File "/usr/local/lib/python2.7/dist-packages/pyquery/pyquery.py", line 70, in fromstring
result = getattr(lxml.html, meth)(context)
File "/usr/lib/python2.7/dist-packages/lxml/html/init.py", line 704, in fromstring
doc = document_fromstring(html, parser=parser, base_url=base_url, **kw)
File "/usr/lib/python2.7/dist-packages/lxml/html/init.py", line 600, in document_fromstring
value = etree.fromstring(html, parser, **kw)
File "lxml.etree.pyx", line 3032, in lxml.etree.fromstring (src/lxml/lxml.etree.c:68106)
File "parser.pxi", line 1785, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:102455)
File "parser.pxi", line 1666, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:101214)
File "parser.pxi", line 1035, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:96124
)
File "parser.pxi", line 582, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.
c:91275)
File "parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:92461)
File "parser.pxi", line 633, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:91924)
lxml.etree.XMLSyntaxError: None
docopt get default value is None
Bump pygments from 2.4.0 to 2.7.4
Bumps pygments from 2.4.0 to 2.7.4.
Release notes
Sourced from pygments's releases.
... (truncated)
Changelog
Sourced from pygments's changelog.
... (truncated)
Commits
4d555d0
Bump version to 2.7.4.fc3b05d
Update CHANGES.ad21935
Revert "Added dracula theme style (#1636)"e411506
Prepare for 2.7.4 release.275e34d
doc: remove Perl 6 ref2e7e8c4
Fix several exponential/cubic complexity regexes found by Ben Caller/Doyenseceb39c43
xquery: fix pop from empty stack2738778
fix coding style in test_analyzer_lexer02e0f09
Added 'ERROR STOP' to fortran.py keywords. (#1665)c83fe48
support added for css variables (#1633)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.
Chrome 浏览器复制文章内容到微信公众号编辑器带上了字体
用 Chrome 最新的浏览器打开 markdown-css 生成的 html ,如果 css 不指定任何字体,也就是没有
font-family
,复制到微信编辑器之后会内联 css 会带上 font-family: "PingFang SC" ,由于微信公众号没有这个字体,微信会把 css 样式去掉,格式会乱,解决方法是