sudoskys/telegramify-markdown

configurable unordered list item marker (default ⦁, allow -, •, etc.)

Geschlossen

#116 geöffnet am 27.05.2026

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (14 Forks)github user discovery
enhancementgood first issuemarkdown

Repository-Metriken

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

Beschreibung

Summary

Unordered list items are always rendered with a hardcoded ⦁ prefix. There is no way to customize this via get_runtime_config().markdown_symbol, unlike heading prefixes, task-list markers, and horizontal rules.

For bots and docs aimed at CommonMark-style output, a hyphen (- ) is often preferred.

Current behavior

In converter.py, _on_start_item() writes a fixed bullet for unordered lists:

Unordered list

self._buf.write(f"{indent}⦁ ") config.py exposes Symbol fields for:

heading_level_1 … heading_level_6 link, image task_completed, task_uncompleted horizontal_rule There is no field for unordered (or ordered) list markers.

Desired behavior

Add configuration on Symbol (or RenderConfig), for example:

from telegramify_markdown.config import get_runtime_config
cfg = get_runtime_config()
cfg.markdown_symbol.unordered_list_item = "- "   # or "• ", "⦁ ", "* ", etc.
# optional:
cfg.markdown_symbol.ordered_list_suffix = ". "  # if ever needed; today it's "N. "

Defaults should stay backward compatible:

unordered_list_item = "⦁ " (current behavior) Semantics: Value is inserted after indent, before list item text (same place as today’s ⦁ ). Plain text only (no entities on the marker), consistent with current list handling. Task lists should continue to use task_completed / task_uncompleted and replace the list marker as today (see _on_task_list_marker).

Contributor Guide