Actions
Defect #38215
closedNested CommonMark Markdown task lists are not indented
Defect #38215:
Nested CommonMark Markdown task lists are not indented
Resolution:
Fixed
Affected version:
Description
Files
Actions
Added by Ko Nagase almost 4 years ago. Updated almost 4 years ago.
Description
Files
| commonmark-nested-checklist-1.png (3.59 KB) commonmark-nested-checklist-1.png | Ko Nagase, 2023-01-28 07:17 | ||
| commonmark-nested-checklist-2.png (4.23 KB) commonmark-nested-checklist-2.png | Ko Nagase, 2023-01-28 07:17 | ||
| 0001-Fix-CommonMark-nested-checklist-indent.patch (753 Bytes) 0001-Fix-CommonMark-nested-checklist-indent.patch | Ko Nagase, 2023-01-28 07:20 | ||
| commonmark-nested-checklist-3.png (4.17 KB) commonmark-nested-checklist-3.png | Ko Nagase, 2023-01-28 07:21 |
What are your thoughts on the following change? It sets the padding-left to 0px only for the first level of the ul.task-list. As a result, the other levels of ul.task-list will use the initial value for padding-left instead of the hard-coded value of 40px, like other ul elements.
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 8c50a9879..001508ada 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1338,9 +1338,11 @@ a.wiki-anchor:hover { color: #aaa !important; text-decoration: none; }
h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor, h4:hover a.wiki-anchor, h5:hover a.wiki-anchor, h6:hover a.wiki-anchor { display: inline; color: #ddd; }
div.wiki img {vertical-align:middle; max-width:100%;}
+div.wiki>.task-list {
+ padding-left: 0px;
+}
div.wiki .task-list {
list-style-type: none;
- padding-left: 0px;
}
div.wiki .task-list input.task-list-item-checkbox {
height: initial;
Go MAEDA wrote:
What are your thoughts on the following change? It sets the
padding-leftto 0px only for the first level of theul.task-list. As a result, the other levels oful.task-listwill use the initial value forpadding-leftinstead of the hard-coded value of 40px, like otherulelements.
Thanks for confirmation and suggesting the new solution!
I confirmed that your suggested diff works correctly, and I felt that it is better than our original patch.
Setting the target version to 5.0.5.
Committed the patch. Thank you for reporting the issue.