8000 fix inconsistency with GitHub Markdown API output for tasklist · MikeWellC/cnblogs-markdown-css@67987bd · GitHub
[go: up one dir, main page]

Skip to content

Commit 67987bd

Browse files
committed
fix inconsistency with GitHub Markdown API output for tasklist
fixes sindresorhus#10
1 parent b276012 commit 67987bd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

github-markdown.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@
689689
margin-top: 3px;
690690
}
691691

692-
.markdown-body .task-list-item-checkbox {
692+
.markdown-body .task-list-item input {
693693
float: left;
694694
margin: 0.3em 0 0.25em -1.6em;
695695
vertical-align: middle;

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ function cleanupCss(str) {
5757
return false;
5858
}
5959

60+
// work around GitHub Markdown API inconsistency #10
61+
if (el.selectors[0] === '.task-list-item-checkbox') {
62+
el.selectors[0] = '.task-list-item input';
63+
}
64+
6065
// remove `body` from `body, input {}`
6166
if (el.selectors[0] === 'body' && el.selectors[1] === 'input') {
6267
el.selectors.shift();

0 commit comments

Comments
 (0)
0