Project

General

Profile

Actions

Defect #38215

closed

Nested CommonMark Markdown task lists are not indented

Added by Ko Nagase almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

We (Takashi Kato, Tomoko Shimizu and Ko Nagase) found that CommonMark nested checklist indent is ignored.

- [ ] test1
  - [ ] test2

Before


Attachment patch solves this issue, so reviewing this is helpful.

After


Files

Actions #1

Updated by Go MAEDA almost 2 years ago

  • Status changed from New to Confirmed

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;
Actions #2

Updated by Ko Nagase almost 2 years ago

Go MAEDA wrote:

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.

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.

Actions #3

Updated by Go MAEDA almost 2 years ago

  • Target version set to 5.0.5

Setting the target version to 5.0.5.

Actions #4

Updated by Go MAEDA almost 2 years ago

  • Subject changed from Fix CommonMark nested checklist indent to Nested CommonMark Markdown task lists are not indented
  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for reporting the issue.

Actions #5

Updated by Go MAEDA almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF