-
Notifications
You must be signed in to change notification settings - Fork 210
Fix indent level for build.rs example #1431
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
Conversation
templates/core/Cargo.toml.example
Outdated
@@ -1,4 +1,4 @@ | |||
{# The example Cargo.toml used in about.html #} | |||
{~# The example Cargo.toml used in about.html #~} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not being rendered by tera, not handlebars? AFAICT from the docs tera has no way to control whitespace in comments (though, if it did, it'd be {#- The example ... -#}
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this will be rendered inline, and -#}
doesn't work to suppress the post-comment-whitespace:
"{# foobar #}\n"
=> Ok("\n")
"{# foobar -#}\n"
=> Ok("\n")
"{~# foobar #~}\n"
=> Ok("{~# foobar #~}\n")
"{% if true %}{% endif -%}\n"
=> Ok("")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I check the /about/metadata
, this actually makes the comment visible in the page, which I assume is not what we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could fix this here to reduce the space on the top of the code-section on that page, or revert this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, fixed it by putting [package]
on the same line as the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change of the dedent level seems to work fine,
when we revert or fix the metadata part, this is good to merge
templates/core/Cargo.toml.example
Outdated
@@ -1,4 +1,4 @@ | |||
{# The example Cargo.toml used in about.html #} | |||
{~# The example Cargo.toml used in about.html #~} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I check the /about/metadata
, this actually makes the comment visible in the page, which I assume is not what we want.
templates/core/Cargo.toml.example
Outdated
@@ -1,4 +1,4 @@ | |||
{# The example Cargo.toml used in about.html #} | |||
{~# The example Cargo.toml used in about.html #~} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could fix this here to reduce the space on the top of the code-section on that page, or revert this change
This is a followup to rust-lang#1315 to fix the extra blank line at the top and to fix the indentation.
Follow-up to #1325.
r? @syphar