Skip to content

Markdown rendering breaks when code blocks contain angle brackets (<>) #1562

@dndgus482

Description

@dndgus482

Description

When using task-master show <id>, the markdown rendering in the "Implementation Details" box breaks if the details field contains angle brackets (<, >) inside fenced code blocks.

Steps to Reproduce

  1. Create a task with details containing code blocks with JSX/HTML-like syntax:
{
  "details": "## Implementation\n\n```tsx\nexport function Component() {\n  return <Navigate to=\"/\" replace />\n}\n```"
}
  1. Run task-master show <id>

  2. Observe: entire Implementation Details section renders as a single line without proper formatting

Expected Behavior

Markdown should render correctly with proper line breaks and formatting. Code blocks should display their contents as-is, including angle brackets.

Actual Behavior

When < characters exist inside code blocks, the entire section renders as one continuous line:

## Current State The PRD mentions `RequireGuest` route guard but it may not be fully implemented...

Instead of properly formatted:

## Current State

The PRD mentions `RequireGuest` route guard but it may not be fully implemented...

Analysis

Tested with tasks in the same file:

  • Tasks with 0 < in details → renders correctly
  • Tasks with < inside code blocks (JSX/TSX) → broken rendering

Workaround

Escaping < as &lt; fixes the rendering, but this shouldn't be necessary inside fenced code blocks.

Environment

  • task-master version: 0.40.1
  • OS: macOS
  • Node: v24.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI functionalityarea:task-managementCore task management featuresbugSomething isn't workingmedium-priorityImportant but not urgent

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions