🔧 Fix Rich markup rendering in input prompts

This commit is contained in:
Vijay Janapa Reddi
2025-08-01 13:59:34 -04:00
parent eca79cc0e8
commit 1a474d8b51

12
binder
View File

@@ -1066,7 +1066,8 @@ class BookBinder:
if current_branch == "dev":
console.print("[yellow]⚠️ You're on dev branch[/yellow]")
console.print("[blue]Should I merge dev into main?[/blue]")
choice = input("[bold]Merge dev to main? (y/n): [/bold]").strip().lower()
console.print("[bold]Merge dev to main? (y/n): [/bold]", end="")
choice = input().strip().lower()
if choice in ['y', 'yes']:
console.print("[blue]🔄 Merging dev to main...[/blue]")
@@ -1105,7 +1106,8 @@ class BookBinder:
console.print(" • [dim]minor[/dim] - New features, chapters (1.0.0 → 1.1.0)")
console.print(" • [dim]major[/dim] - Breaking changes (1.0.0 → 2.0.0)")
version_choice = input(f"[bold]Version type (patch/minor/major) [{change_type}]: [/bold]").strip().lower()
console.print(f"[bold]Version type (patch/minor/major) [{change_type}]: [/bold]", end="")
version_choice = input().strip().lower()
if not version_choice:
version_choice = change_type
@@ -1121,14 +1123,16 @@ class BookBinder:
# Ask about release creation
console.print("\n[blue]📦 Create GitHub release?[/blue]")
release_choice = input("[bold]Create release? (y/n): [/bold]").strip().lower()
console.print("[bold]Create release? (y/n): [/bold]", end="")
release_choice = input().strip().lower()
create_release = release_choice in ['y', 'yes']
# Ask about AI release notes
use_ai_notes = False
if create_release:
console.print("\n[blue]📝 Generate release notes with AI?[/blue]")
ai_choice = input("[bold]Use AI for release notes? (y/n): [/bold]").strip().lower()
console.print("[bold]Use AI for release notes? (y/n): [/bold]", end="")
ai_choice = input().strip().lower()
use_ai_notes = ai_choice in ['y', 'yes']
return {