fix: Rich Markup im Ereignis-Log rendern (Text.from_markup)
Text.append() behandelte [red]..[/] als Literaltext. Text.from_markup() parst Rich-Markup-Tags korrekt.
This commit is contained in:
+3
-1
@@ -137,7 +137,9 @@ def render_game(engine: GameEngine) -> Panel:
|
|||||||
log_text = Text()
|
log_text = Text()
|
||||||
for entry in engine.log[-12:]:
|
for entry in engine.log[-12:]:
|
||||||
if isinstance(entry, str):
|
if isinstance(entry, str):
|
||||||
log_text.append(entry + "\n")
|
t = Text.from_markup(entry)
|
||||||
|
log_text.append(t)
|
||||||
|
log_text.append("\n")
|
||||||
|
|
||||||
# === Location ===
|
# === Location ===
|
||||||
loc_text = f"🌍 {engine.current_location}"
|
loc_text = f"🌍 {engine.current_location}"
|
||||||
|
|||||||
Reference in New Issue
Block a user