MacDownApp/macdown

Re-formatting tool for list items

Open

#170 aperta il 20 set 2014

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Objective-C (930 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (7686 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Ref #93.

Markdown ignores numbering in the source when rendering ordered lists. So even if your document goes

6. Foo
7. Bar
3. Baz

the resulted list would still have numbers 1, 2, and 3. Still, it is good practice in general to have a nice, ordered list in the source, both for readability and maintainability. One ”solution” to this is to always use identical numbering markers, e.g.

1. Foo
1. Bar
1. Baz

as recommended in #93. This is reasonable, and is implemented in PR #169. But it is still a setback in readability. For those who choose to use natural numbering, a auto-reformatting tool would be nice.

This tool should be able to trigger with a menu item. On triggering, all selected text in parsed, and ordered lists inside would be reformatted with ”correct” numbering. The correct format depends on the auto-increment option; if auto-increment is on, it’s natural numbering, otherwise it’s just 1. 1. 1. 1.. All text not selected would be left as-is. Indentation and nested lists (including unordered ones) should be kept. Only the numbering in ordered list items are redone.

Guida contributor