Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13143 closed defect (fixed)

Nested lists are not working

Reported by: j.femia@… Owned by: j.femia@…
Priority: normal Component: MarkdownMacro
Severity: normal Keywords: patch
Cc: Trac Release: 1.0

Description

The following markdown results in a single level list, instead of being correctly nested.

* List item
* Other list item
 * Nested item
 * Other nested item

Output:

  • List item
  • Other list item
  • Nested item
  • Other nested item

Attachments (1)

markdown_macro_tab_size.diff (1.3 KB) - added by j.femia@… 7 years ago.
Patch adding a setting for control tab size passed to Markdown

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by anonymous

Python-Markdown says:

The syntax rules clearly state that when a list item consists of multiple paragraphs, “each subsequent paragraph in a list item must be indented by either 4 spaces or one tab” (emphasis added). However, many implementations do not enforce this rule and allow less than 4 spaces of indentation. The implementers of Python-Markdown consider it a bug to not enforce this rule.

This applies to any block level elements nested in a list, including paragraphs, sub-lists, blockquotes, code blocks, etc. They must always be indented by at least four spaces (or one tab) for each level of nesting.

In the event that one would prefer different behavior, tab_length can be set to whatever length is desired. Be warned however, as this will affect indentation for all aspects of the syntax (including root level code blocks).

comment:2 Changed 7 years ago by Ryan J Ollos

PatchWelcome. Ideally we should allow the behavior to be configured using an plugin option.

Changed 7 years ago by j.femia@…

Patch adding a setting for control tab size passed to Markdown

comment:3 Changed 7 years ago by anonymous

Keywords: patch added

comment:4 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 16481:

TracMarkdownMacro 0.11.6: Allow tab_length to be configured

Patch by j.femia@….

Fixes #13143.

comment:5 Changed 7 years ago by Ryan J Ollos

Owner: changed from Ryan J Ollos to j.femia@…

Thanks for the patch!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain j.femia@….
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.