Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update rust crate handlebars to v4.5.0 #13168

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

leonzchang
Copy link
Contributor

@leonzchang leonzchang commented Dec 14, 2023

In the latest version of handlebars, rules for whitespace auto elimination is to check if the directive {{# xxx}}`` and ``{{/ xxx}} is holding a whole line, with leading and trailing whitespaces counted, and then remove the trailing NEWLINE (See template.rs).

{{#options}}
                              <--- this newline will be removed after a standalone block
{{#option "`-o` _outdir_"}}
                              <--- this newline will be removed
Some content

{{/option}}
                              <--- this newline will be removed
{{/options}}
                              <--- this newline will be removed

This PR changes includes (fixes #13162):

  1. update handlebars crate to v4.5.0.
  2. add extra NEWLINE to helper blocks options, option to align with the new strip rules, preserving the original behavior.
  3. update doc(the rest handlebars expression) to align with the new strip rules..

@rustbot
Copy link
Collaborator

rustbot commented Dec 14, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 14, 2023
@ehuss
Copy link
Contributor

ehuss commented Dec 14, 2023

@rustbot author

Please let us know if you have any questions.

@rustbot rustbot added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 14, 2023
@leonzchang leonzchang marked this pull request as ready for review December 18, 2023 07:49
@leonzchang
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. labels Dec 18, 2023
@epage
Copy link
Contributor

epage commented Dec 18, 2023

Could you update the commits for how you'd want them merged (every commit being "correct")?

@leonzchang
Copy link
Contributor Author

leonzchang commented Dec 19, 2023

Could you update the commits for how you'd want them merged (every commit being "correct")?

The example below will break markdown rendering while following the latest version of handlebars strip rules.

 <!-- template -->
{{#options}}

some content...

{{/options}}

### Section options




 <!-- original output -->
<dl>

some content...

</dl>

### Section options 




 <!-- output after update handlebars -->
<dl>
some content...

</dl>
### Section options                             <--- adjacent html and headings breaks markdown rendering

What I have changed is to add an extra newline to preserve the original behavior of the options and option helper blocks. The rest of the expression will follow to the new strip rules, stripping a newline if a block is standalone.

@epage
Copy link
Contributor

epage commented Dec 19, 2023

To be clear, it looks like your commits in the PR were checkpoints during your development and I suspect they don't all work. I was asking to clean them up, whether thats for squashing all of them into one commit or doing multiple, I leave it to you.

@leonzchang
Copy link
Contributor Author

To be clear, it looks like your commits in the PR were checkpoints during your development and I suspect they don't all work. I was asking to clean them up, whether thats for squashing all of them into one commit or doing multiple, I leave it to you.

Ok, done.

@epage
Copy link
Contributor

epage commented Dec 20, 2023

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Dec 20, 2023

📌 Commit b96b244 has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2023
@bors
Copy link
Contributor

bors commented Dec 20, 2023

⌛ Testing commit b96b244 with merge c21be2b...

@bors
Copy link
Contributor

bors commented Dec 20, 2023

☀️ Test successful - checks-actions
Approved by: epage
Pushing c21be2b to master...

@bors bors merged commit c21be2b into rust-lang:master Dec 20, 2023
22 checks passed
Cargo.lock Show resolved Hide resolved
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 22, 2023
Update cargo

10 commits in 1a2666ddd14cf0a255d4ddb61c63531c259a7b39..363a2d11320faf531f6aacd1ea067c6bc08343b9
2023-12-17 17:53:53 +0000 to 2023-12-22 03:12:42 +0000
- refactor: centralize git checkouts and db paths (rust-lang/cargo#13187)
- Bump to 0.78.0; update changelog (rust-lang/cargo#13192)
- refactor: custom error types for `cargo-util-schemas` (rust-lang/cargo#13186)
- chore(deps): update rust crate handlebars to `v4.5.0` (rust-lang/cargo#13168)
- Hold the mutate exclusive lock when vendoring (rust-lang/cargo#12509)
- refactor: clean up package metadata (rust-lang/cargo#13184)
- ci: check SemVer for cargo-util-schemas on CI (rust-lang/cargo#13185)
- refactor(schemas): Pull out as `cargo-util-schemas` (rust-lang/cargo#13178)
- chore(rustfix): rename Readme.md to README.md (rust-lang/cargo#13181)
- chore(rustfix): remove useless clippy rules and fix a typo (rust-lang/cargo#13182)

r? ghost
@rustbot rustbot added this to the 1.77.0 milestone Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update dependency handlebars to v4 for mdman
6 participants