configurable unordered list item marker (default ⦁, allow -, •, etc.)
#116 opened on May 27, 2026
Repository metrics
- Stars
- (362 stars)
- PR merge metrics
- (PR metrics pending)
Description
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).