Skip to content

Fix empty custom separator decompile#195

Open
CorrectRoadH wants to merge 1 commit into
electrikmilk:mainfrom
CorrectRoadH:codex/decompile-empty-custom-separator
Open

Fix empty custom separator decompile#195
CorrectRoadH wants to merge 1 commit into
electrikmilk:mainfrom
CorrectRoadH:codex/decompile-empty-custom-separator

Conversation

@CorrectRoadH

@CorrectRoadH CorrectRoadH commented May 23, 2026

Copy link
Copy Markdown
Contributor

This fixes decompiling text actions that use a custom separator set to an empty string.

Previously, decompTextParts only emitted the separator argument when the decompiled separator value was non-empty. That meant an explicit empty custom separator was dropped from the generated Cherri code, changing the behavior of the imported Shortcut.

This keeps track of whether WFTextCustomSeparator was present separately from its value, so an empty string can still be emitted as an intentional argument.

A regression test was added for the empty custom separator case. I verified this with go test -run TestDecompileTextPartsKeepsEmptyCustomSeparator and go test -run TestDecomp.

@CorrectRoadH

Copy link
Copy Markdown
Contributor Author

@electrikmilk I split this out from #192 into this separate PR as requested.

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