Explorar o código

chore: add class to tasklist items

Estevão Soares dos Santos %!s(int64=10) %!d(string=hai) anos
pai
achega
20ca099f56

+ 1 - 1
dist/showdown.js

@@ -1702,7 +1702,7 @@ showdown.subParser('lists', function (text, options, globals) {
         bulletStyle = '';
 
       if (taskbtn) {
-        bulletStyle = ' style="list-style-type: none;"';
+        bulletStyle = ' class="task-list-item" style="list-style-type: none;"';
       }
 
       return spl + tp + '<li' + bulletStyle + '>' + item + '</li>\n';

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/showdown.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/showdown.min.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/showdown.min.js.map


+ 1 - 1
src/subParsers/lists.js

@@ -76,7 +76,7 @@ showdown.subParser('lists', function (text, options, globals) {
         bulletStyle = '';
 
       if (taskbtn) {
-        bulletStyle = ' style="list-style-type: none;"';
+        bulletStyle = ' class="task-list-item" style="list-style-type: none;"';
       }
 
       return spl + tp + '<li' + bulletStyle + '>' + item + '</li>\n';

+ 3 - 3
test/features/#164.4.tasklists.html

@@ -2,9 +2,9 @@
 
 <ul>
     <li>foo</li>
-    <li style="list-style-type: none;"><input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"> bar</li>
-    <li style="list-style-type: none;"><input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"> baz</li>
-    <li style="list-style-type: none;"><input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;" checked> bazinga</li>
+    <li class="task-list-item" style="list-style-type: none;"><input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"> bar</li>
+    <li class="task-list-item" style="list-style-type: none;"><input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"> baz</li>
+    <li class="task-list-item" style="list-style-type: none;"><input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;" checked> bazinga</li>
 </ul>
 
 <p>otherthings</p>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio