Skip to content

fix: normalize CRLF text input across text effects#50

Open
Nomadcxx wants to merge 2 commits intomasterfrom
fix/crlf-text-normalization
Open

fix: normalize CRLF text input across text effects#50
Nomadcxx wants to merge 2 commits intomasterfrom
fix/crlf-text-normalization

Conversation

@Nomadcxx
Copy link
Owner

@Nomadcxx Nomadcxx commented Mar 4, 2026

Summary

  • add normalizeMultilineText helper to normalize CRLF/CR to LF
  • apply normalization in constructors and SetText for matrix-art, rain-art, ring-text, blackhole, beam-text, and print
  • add regression test TestTextEffects_NormalizeCRLFInput to prevent carriage-return leakage into rendered output

Why

CRLF text files could leak raw carriage-return control characters into effect rendering and width calculations, which breaks ASCII layout (including skull/text art usage).

Verification

  • go test ./animations -run TestTextEffects_NormalizeCRLFInput -v
  • go test ./animations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant