MacDownApp/macdown

Re-formatting tool for list items

Open

#170 geöffnet am 20. Sept. 2014

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Objective-C (930 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (7.686 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide