-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #13168 - leonzchang:handlebars-v4, r=epage
chore(deps): update rust crate handlebars to `v4.5.0` 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`](https://github.com/sunng87/handlebars-rust/blob/9d7d5556287e31e4148841a56e0981b64a679fb6/src/template.rs#L568-L889)). ```md {{#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..
- Loading branch information
Showing
42 changed files
with
68 additions
and
441 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ Shortcut unknown: [shortcut unknown] | |
|
||
{{> links-include}} | ||
|
||
|
||
## OPTIONS | ||
|
||
{{#options}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ A named argument. | |
|
||
{{> options-common}} | ||
|
||
|
||
## EXAMPLES | ||
|
||
1. An example | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
{{*set foo="Bar"}} | ||
|
||
|
||
{{foo}} | ||
|
||
{{lower foo}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.