Skip to content

Fix parameter passing for single-quoted string literals#577

Merged
sunng87 merged 4 commits into
sunng87:masterfrom
nickvollmar:single-quote-parameters
May 10, 2023
Merged

Fix parameter passing for single-quoted string literals#577
sunng87 merged 4 commits into
sunng87:masterfrom
nickvollmar:single-quote-parameters

Conversation

@nickvollmar

Copy link
Copy Markdown
Contributor

Addresses issue #575.

I added some more checks to the test_string_no_escape_422 function, because it seemed to be testing closely related behavior. But if you want I could put them in a new 575 function instead.

Comment thread src/template.rs Outdated
.replace("\\'", "'")
.replace('"', "\\\"")
);
Parameter::Literal(Json::from_str(&double_quoted).unwrap())

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

is it 100% safe to do unwrap here? Otherwise we better raise an TemplateError here

@coveralls

coveralls commented May 7, 2023

Copy link
Copy Markdown

Coverage Status

Coverage: 80.515% (+0.1%) from 80.376% when pulling 21341df on nickvollmar:single-quote-parameters into 27a9a9a on sunng87:master.

@sunng87

sunng87 commented May 10, 2023

Copy link
Copy Markdown
Owner

@nickvollmar Thank you!

@sunng87 sunng87 merged commit 4cb081e into sunng87:master May 10, 2023
sunng87 added a commit that referenced this pull request May 10, 2023
Fix parameter passing for single-quoted string literals
crapStone added a commit to Calciumdibromid/CaBr2 that referenced this pull request Jun 12, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [handlebars](https://github.com/sunng87/handlebars-rust) | dependencies | patch | `4.3.6` -> `4.3.7` |

---

### Release Notes

<details>
<summary>sunng87/handlebars-rust</summary>

### [`v4.3.7`](https://github.com/sunng87/handlebars-rust/releases/tag/v4.3.7)

[Compare Source](sunng87/handlebars-rust@v4.3.6...v4.3.7)

-   \[Fixed] Use fully qualified name of `Result` in `handlebars_helper` macro \[[#&#8203;578](sunng87/handlebars-rust#578)]
-   \[Fixed] Allow single-quote JSON literal \[[#&#8203;577](sunng87/handlebars-rust#577)]

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45Ni4yIiwidXBkYXRlZEluVmVyIjoiMzUuOTYuMiIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AifQ==-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Co-authored-by: crapStone <crapstone01@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1894
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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