mirror of
https://github.com/sindresorhus/github-markdown-css.git
synced 2024-03-22 13:10:53 +08:00
fix inconsistency with GitHub Markdown API output for tasklist
fixes #10
This commit is contained in:
parent
b276012212
commit
67987bd089
|
@ -689,7 +689,7 @@
|
|||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.markdown-body .task-list-item-checkbox {
|
||||
.markdown-body .task-list-item input {
|
||||
float: left;
|
||||
margin: 0.3em 0 0.25em -1.6em;
|
||||
vertical-align: middle;
|
||||
|
|
5
index.js
5
index.js
|
@ -57,6 +57,11 @@ function cleanupCss(str) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// work around GitHub Markdown API inconsistency #10
|
||||
if (el.selectors[0] === '.task-list-item-checkbox') {
|
||||
el.selectors[0] = '.task-list-item input';
|
||||
}
|
||||
|
||||
// remove `body` from `body, input {}`
|
||||
if (el.selectors[0] === 'body' && el.selectors[1] === 'input') {
|
||||
el.selectors.shift();
|
||||
|
|
Loading…
Reference in New Issue
Block a user