Skip to content

[Milestone A] A-01: Fix whitespace text node suppression in AspxParser #76

@csharpfritz

Description

@csharpfritz

Milestone A — Parser Hardening (A-01)

Priority: P0 — Foundation
Size: Small
Branch: experiment/aspx-middleware
File: src/BlazorWebFormsComponents.AspxMiddleware/AspxParser.cs (~line 177)

Problem

The AspxParser silently drops whitespace-only text nodes via an IsNullOrWhiteSpace check. This breaks layout and spacing in rendered pages — whitespace between inline controls (e.g., <asp:Label>\ followed by <asp:TextBox>) is layout-significant in HTML.

Acceptance Criteria

  • Remove or narrow the \IsNullOrWhiteSpace\ check so whitespace-only nodes are preserved as \AspxTextNode\ instances
  • Preserve \n, \r\n, single spaces, and runs of spaces
  • Only discard truly empty nodes ("")
  • All ~52 existing tests still pass

Context

See: \dev-docs/milestones/ASPX-MIDDLEWARE-MILESTONES.md\ § Milestone A
See: \dev-docs/aspx-middleware-migration-landscape.md\ §4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:cyclopsAssigned to Cyclops (Component Dev)squad:rogueAssigned to Rogue (QA Analyst)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions