Skip to content

fix: preserve emoji ZWJ sequences through YAML↔HCL roundtrip#5

Merged
jccguimaraes merged 2 commits into
mainfrom
fix/emoji-support
Mar 31, 2026
Merged

fix: preserve emoji ZWJ sequences through YAML↔HCL roundtrip#5
jccguimaraes merged 2 commits into
mainfrom
fix/emoji-support

Conversation

@jccguimaraes
Copy link
Copy Markdown
Contributor

hclwrite escapes U+200D (ZWJ, category Cf) via unicode.IsPrint, and
yaml.v3's is_printable misses 4-byte UTF-8, causing supplementary-plane
emoji to be re-escaped as \UXXXXXXXX on the return trip.

Post-process HCL and YAML output at each generation boundary with
unescapeHCLUnicode / unescapeYAMLUnicode, restoring raw UTF-8 for
codepoints ≥ U+00A0. Adds TestEmojiRoundtripStability to provider/github.

  hclwrite escapes U+200D (ZWJ, category Cf) via unicode.IsPrint, and
  yaml.v3's is_printable misses 4-byte UTF-8, causing supplementary-plane
  emoji to be re-escaped as \UXXXXXXXX on the return trip.

  Post-process HCL and YAML output at each generation boundary with
  unescapeHCLUnicode / unescapeYAMLUnicode, restoring raw UTF-8 for
  codepoints ≥ U+00A0. Adds TestEmojiRoundtripStability to provider/github.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

Go test coverage: 64.8% for commit 5f2725f
⚠️ 1 of 19 packages have zero coverage.
  • github.com/yldio/cinzel/internal/test
View coverage for all packages
# Package Name                                     | Coverage
+ github.com/yldio/cinzel                          |    80.0%
+ github.com/yldio/cinzel/internal/ai              |    46.8%
+ github.com/yldio/cinzel/internal/cinzelerror     |    18.2%
+ github.com/yldio/cinzel/internal/command         |    39.5%
+ github.com/yldio/cinzel/internal/filereader      |    50.0%
+ github.com/yldio/cinzel/internal/filewriter      |    88.9%
+ github.com/yldio/cinzel/internal/fsutil          |    68.0%
+ github.com/yldio/cinzel/internal/hclparser       |    62.7%
+ github.com/yldio/cinzel/internal/maputil         |    93.3%
+ github.com/yldio/cinzel/internal/naming          |    93.1%
+ github.com/yldio/cinzel/internal/pin             |    58.0%
- github.com/yldio/cinzel/internal/test            |     0.0%
+ github.com/yldio/cinzel/internal/yamlwriter      |    88.9%
+ github.com/yldio/cinzel/provider/github          |    69.0%
+ github.com/yldio/cinzel/provider/github/action   |    82.1%
+ github.com/yldio/cinzel/provider/github/job      |    92.6%
+ github.com/yldio/cinzel/provider/github/step     |    69.3%
+ github.com/yldio/cinzel/provider/github/workflow |    85.6%
+ github.com/yldio/cinzel/provider/gitlab          |    63.5%

@jccguimaraes jccguimaraes merged commit d4925da into main Mar 31, 2026
3 checks passed
@jccguimaraes jccguimaraes deleted the fix/emoji-support branch March 31, 2026 16:22
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