Auto-increment markdown lists
What does this MR do and why?
Based on feedback on auto-numbering markdown ordered lists, this changes the behavior in two ways:
-
changes from "single numbering"
1. one 1. two 1. three
to "incremental numbering"
1. one 2. two 3. three
When adding a new list item to the end of a list, we will increment the number, rather than repeating it.
As mentioned in #352974 (comment 849307359), the use of "single numbering" is a GitLab created style
It is only a GitLab guidance that we try to list as
1.
,1.
,1.
.To be practical and avoid errors on the numbers, use "1" for all the items. The markdown engine will output them in the correct order.
and is not necessarily what users expect.
-
When adding a new list item between two list items, for example between
2.
and3.
, we will not increment the number, but instead use the number of the previous item. This makes it obvious that a new item has been inserted, but maintains some "reasonable" numbering, without requiring the editor to detect and renumber other tasks.1. one 2. two 2. four 3. three
Screenshots or screen recordings
How to set up and validate locally
-
Enable the
markdown_continue_lists
feature flag in the rails cFeature.enable(:markdown_continue_lists)
-
Edit a description or comment and add markdown lists like you normally would
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #352974 (closed)