MacDownApp/macdown

Re-formatting tool for list items

Open

#170 aberto em 20 de set. de 2014

Ver no GitHub
 (0 comments) (0 reactions) (0 assignees)Objective-C (930 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (7.686 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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.

Guia do colaborador