Skip to content

Fix for empty string format - #1112

Closed
akp111 wants to merge 7 commits into
google:mainfrom
akp111:main
Closed

Fix for empty string format#1112
akp111 wants to merge 7 commits into
google:mainfrom
akp111:main

Conversation

@akp111

@akp111 akp111 commented Mar 1, 2025

Copy link
Copy Markdown
Contributor

Fixes #<number_goes_here>

  • Tests pass
  • Appropriate changes to README are included in PR

@google-cla

google-cla Bot commented Mar 1, 2025

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Comment thread src/goods.ts Outdated
export function echo(...args: any[]): void
export function echo(pieces: TemplateStringsArray, ...args: any[]) {
const lastIdx = pieces.length - 1
console.log(isStringLiteral(pieces, ...args))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Debug point should be removed.

Comment thread src/goods.ts Outdated
? arg.toString().trimEnd()
: arg === ''
? `${''}`
: `${arg}`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Provide a test for this case.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think this is a right place for this fix. It should be done in quote function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hey @antonmedv . When you say quote function, is it the one on core.ts?

Comment thread src/goods.ts Outdated
? arg.toString().trimEnd()
: arg === ''
? `${''}`
: `${arg}`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think this is a right place for this fix. It should be done in quote function.

antongolub added a commit to antongolub/zx that referenced this pull request Mar 1, 2025
antongolub added a commit to antongolub/zx that referenced this pull request Mar 1, 2025
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.

3 participants