Skip to content

refactor(markdown): remove unused derived style state - #4856

Merged
dgageot merged 1 commit into
mainfrom
refactor/markdown-remove-unused-derived-style-state-17f58d39c
Nov 9, 2026
Merged

dgageot merged 1 commit into
mainfrom
refactor/markdown-remove-unused-derived-style-state-17f58d39c

Conversation

@dgageot

@dgageot dgageot commented Nov 9, 2026

Copy link
Copy Markdown
Member

Summary

Remove write-only italic state and unused derived Markdown style caches, avoiding their construction.

Live ANSI attribute composition, nested emphasis handling, and table rendering remain unchanged.

Standalone cleanup: one commit against main; no dependency on the other cleanup PRs.

Validation

  • task --force build
  • task test
  • task --force lint
  • Single signed commit verified; patch equivalent to the original commit.

Signed-off-by: David Gageot <david.gageot@docker.com>
Assisted-By: OpenAI
@dgageot
dgageot requested a review from a team as a code owner November 9, 2026 12:10
Copilot AI balanced review requested due to automatic review settings November 9, 2026 12:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the cleanup of unused Markdown renderer style state.

No open issues 🎉

What changed in this PR

This cleanup removes unused style state from the TUI’s Markdown renderer, avoiding unnecessary cache construction while preserving live ANSI composition, nested emphasis handling, and table rendering.

Changes:

  • Remove the write-only hasItalic flag and its assignments.
  • Remove unused italic, bold-italic, strikethrough, and table-separator style caches.
File Description
pkg/​tui/​components/​markdown/​fast_renderer.go Remove unused style fields and initialization while retaining active rendering logic.

Review effort: Balanced

@aheritier aheritier added area/tui For features/issues/fixes related to the TUI kind/refactor PR refactors code without behavior change labels Nov 9, 2026
@dgageot
dgageot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 00c9b84 Nov 9, 2026
18 checks passed
@dgageot
dgageot deleted the refactor/markdown-remove-unused-derived-style-state-17f58d39c branch November 9, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tui For features/issues/fixes related to the TUI kind/refactor PR refactors code without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants