Fix blumeops-tasks swallowing bracket content in descriptions
Rich markup parser interprets [text] as style tags, stripping wiki-links like [[review-compensating-controls]] to empty []. Escape description lines with rich.markup.escape(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
59f3422d3e
commit
d3d67272a7
1 changed files with 3 additions and 2 deletions
|
|
@ -26,6 +26,7 @@ from datetime import date
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
|
from rich.markup import escape
|
||||||
from rich.text import Text
|
from rich.text import Text
|
||||||
|
|
||||||
TODOIST_API_BASE = "https://api.todoist.com/api/v1"
|
TODOIST_API_BASE = "https://api.todoist.com/api/v1"
|
||||||
|
|
@ -150,10 +151,10 @@ def main() -> int:
|
||||||
header.append(f" {content}")
|
header.append(f" {content}")
|
||||||
console.print(header)
|
console.print(header)
|
||||||
|
|
||||||
# Description indented
|
# Description indented (escape rich markup to preserve brackets)
|
||||||
if description:
|
if description:
|
||||||
for line in description.split("\n"):
|
for line in description.split("\n"):
|
||||||
console.print(f" {line}", style="dim")
|
console.print(f" {escape(line)}", style="dim")
|
||||||
|
|
||||||
console.print()
|
console.print()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue