Browse Source

chore: add class to tasklist items

Estevão Soares dos Santos 10 năm trước cách đây
mục cha
commit
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';

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/showdown.js.map


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/showdown.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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>

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác