Skip to content

Fixes argument parsing for escaped newlines - #1176

Merged
ehmicky merged 4 commits into
sindresorhus:mainfrom
aarondandy:escaped-line-breaks
Dec 7, 2024
Merged

ehmicky merged 4 commits into
sindresorhus:mainfrom
aarondandy:escaped-line-breaks

Conversation

@aarondandy

@aarondandy aarondandy commented Dec 6, 2024 •

Copy link
Copy Markdown
Contributor

Fixes #1175.

Trying to handle escaped line breaks in template strings.

@aarondandy aarondandy changed the title Adds test for escaped newline issue Fixes argument parsing for escaped newlines Dec 6, 2024
@aarondandy

Copy link
Copy Markdown
Contributor Author

I'm not sure if I have this fix right, even though the test passes.

@ehmicky

ehmicky commented Dec 6, 2024

Copy link
Copy Markdown
Collaborator

Hi @aarondandy,

Thanks, but this should not be needed due to #1175 (comment)

@ehmicky ehmicky closed this Dec 6, 2024
Comment thread test/methods/template.js Resolved
@aarondandy

aarondandy commented Dec 6, 2024 •

Copy link
Copy Markdown
Contributor Author

Even though this is closed, I still think this indicates a bug in splitByWhitespaces. I think my current solution is insufficient though because it does not correctly treat these escaped newlines as token terminators which appears to be the intent of this method. An example that I think may highlight this would be a failure if the next line is unindented. I'm thinking that maybe the behavior that would better fit the intent of this method would be to delimit tokens on these escaped newlines while also correctly adjusting the index values.

Edit: I'm not longer confident in my unconfidence, see: #1175 (comment)

Comment thread lib/methods/template.js Resolved
Comment thread lib/methods/template.js Resolved
@ehmicky

ehmicky commented Dec 6, 2024

Copy link
Copy Markdown
Collaborator

Let's continue this discussion on #1175.

@ehmicky ehmicky reopened this Dec 6, 2024
@ehmicky
ehmicky marked this pull request as ready for review December 6, 2024 23:10
@ehmicky

ehmicky commented Dec 6, 2024 •

Copy link
Copy Markdown
Collaborator

This looks good (except for a few small things), thanks for the PR. πŸ‘

Comment thread test/methods/template.js Resolved
Comment thread test/methods/template.js Resolved
@ehmicky

ehmicky commented Dec 7, 2024

Copy link
Copy Markdown
Collaborator

Looks good to me. Thanks again @aarondandy.

@sindresorhus Is this good to merge?

@ehmicky
ehmicky merged commit 2aa3b0c into sindresorhus:main Dec 7, 2024
renovate Bot added a commit to mmkal/eslint-plugin-mmkal that referenced this pull request Dec 8, 2024
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 8, 2024
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | execa   | 9.5.1 | 9.5.2 |


## [v9.5.2](https://github.com/sindresorhus/execa/releases/tag/v9.5.2)

#### Bug fixes

-   Fix escaping newlines inside template strings. Thanks [@aarondandy](https://github.com/aarondandy)! ([#1176](sindresorhus/execa#1176))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 10, 2024
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | execa   | 9.5.1 | 9.5.2 |


## [v9.5.2](https://github.com/sindresorhus/execa/releases/tag/v9.5.2)

#### Bug fixes

-   Fix escaping newlines inside template strings. Thanks [@aarondandy](https://github.com/aarondandy)! ([#1176](sindresorhus/execa#1176))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 11, 2024
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | execa   | 9.5.1 | 9.5.2 |


## [v9.5.2](https://github.com/sindresorhus/execa/releases/tag/v9.5.2)

#### Bug fixes

-   Fix escaping newlines inside template strings. Thanks [@aarondandy](https://github.com/aarondandy)! ([#1176](sindresorhus/execa#1176))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 12, 2024
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | execa   | 9.5.1 | 9.5.2 |


## [v9.5.2](https://github.com/sindresorhus/execa/releases/tag/v9.5.2)

#### Bug fixes

-   Fix escaping newlines inside template strings. Thanks [@aarondandy](https://github.com/aarondandy)! ([#1176](sindresorhus/execa#1176))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Dec 14, 2024
| datasource | package | from  | to    |
| ---------- | ------- | ----- | ----- |
| npm        | execa   | 9.5.1 | 9.5.2 |


## [v9.5.2](https://github.com/sindresorhus/execa/releases/tag/v9.5.2)

#### Bug fixes

-   Fix escaping newlines inside template strings. Thanks [@aarondandy](https://github.com/aarondandy)! ([#1176](sindresorhus/execa#1176))
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.

Escaped newlines break arguments in version 9

3 participants