From 67987bd089f62a1067faf2f6df1f6934a24bdfa7 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Wed, 1 Oct 2014 18:05:52 +0200 Subject: [PATCH] fix inconsistency with GitHub Markdown API output for tasklist fixes #10 --- github-markdown.css | 2 +- index.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/github-markdown.css b/github-markdown.css index 1146596..422151f 100644 --- a/github-markdown.css +++ b/github-markdown.css @@ -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; diff --git a/index.js b/index.js index 59717b4..35017b2 100644 --- a/index.js +++ b/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();