MacDownApp/macdown

Re-formatting tool for list items

Open

#170 ouverte le 20 sept. 2014

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Objective-C (930 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (7 686 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur