-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Fix whitespaces #2075
Fix whitespaces #2075
Conversation
chulkilee
commented
Sep 6, 2017
•
edited
Loading
edited
- use LF for new line
- remove trailing whitespaces, except two spaces at EOL in markdown
- add missing new line at the end of file
I think it would be better to have this one-time large commit than having individual commit with whitespaces changes on irrelevant parts. |
How does this interact with our linters? Is this something that we can add to our code cleaning tools to do automatically? |
docs/basics.md
Outdated
@@ -132,10 +132,10 @@ For instance, `PathPrefix: /products` would match `/products` but also `/product | |||
Since the path is forwarded as-is, your backend is expected to listen on `/products`. | |||
|
|||
Use a `*Strip` matcher if your backend listens on the root path (`/`) but should be routeable on a specific prefix. | |||
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`. |
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.
2 spaces have a meaning in markdown.
When you do want to insert a
break tag using Markdown, you end a line with two or more spaces, then type return.
https://daringfireball.net/projects/markdown/syntax#p
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.
Oh I didn't know that. Then here are options:
- keep the two spaces at EOL
- replace the two spaces at EOL with
<br>
- replace the two spaces at EOL with
\n\n
to separate paragraphs - use different formatting, such as
!!! note
or lists
I still don't like the significant trailing spaces since it's very easy to mess up. I think using <br>
is better if <br>
is really needed. Otherwise, the best option is to avoid <br>
at all - use separate paragraphs or other formatting.
Let me know - I'll make changes in this PR accordingly.
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.
keep the two spaces at EOL
docs/basics.md
Outdated
@@ -132,10 +132,10 @@ For instance, `PathPrefix: /products` would match `/products` but also `/product | |||
Since the path is forwarded as-is, your backend is expected to listen on `/products`. | |||
|
|||
Use a `*Strip` matcher if your backend listens on the root path (`/`) but should be routeable on a specific prefix. | |||
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`. | |||
Since the path is stripped prior to forwarding, your backend is expected to listen on `/`. |
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.
same here
docs/basics.md
Outdated
@@ -132,10 +132,10 @@ For instance, `PathPrefix: /products` would match `/products` but also `/product | |||
Since the path is forwarded as-is, your backend is expected to listen on `/products`. | |||
|
|||
Use a `*Strip` matcher if your backend listens on the root path (`/`) but should be routeable on a specific prefix. | |||
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`. | |||
Since the path is stripped prior to forwarding, your backend is expected to listen on `/`. | |||
If your backend is serving assets (e.g., images or Javascript files), chances are it must return properly constructed relative URLs. |
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.
same here
docs/basics.md
Outdated
For instance, `PathPrefixStrip: /products` would match `/products` but also `/products/shoes` and `/products/shirts`. | ||
Since the path is stripped prior to forwarding, your backend is expected to listen on `/`. | ||
If your backend is serving assets (e.g., images or Javascript files), chances are it must return properly constructed relative URLs. | ||
Continuing on the example, the backend should return `/products/shoes/image.png` (and not `/images.png` which Traefik would likely not be able to associate with the same backend). |
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.
same here
docs/basics.md
Outdated
@@ -208,7 +208,7 @@ Finally, you can create a rule to bind multiple domains or Path to a frontend, u | |||
|
|||
#### Rules Order | |||
|
|||
When combining `Modifier` rules with `Matcher` rules, it is important to remember that `Modifier` rules **ALWAYS** apply after the `Matcher` rules. |
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.
same here
@@ -355,7 +355,7 @@ requests periodically carried out by Traefik. The check is defined by a path | |||
appended to the backend URL and an interval (given in a format understood by [time.ParseDuration](https://golang.org/pkg/time/#ParseDuration)) specifying how | |||
often the health check should be executed (the default being 30 seconds). | |||
Each backend must respond to the health check within 5 seconds. | |||
By default, the port of the backend server is used, however, this may be overridden. |
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.
same here
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.
There is no following lines after this line - this is the end of the paragraph. So I think it's okay to remove two spaces here.
|
||
- `id` (string): The id is the primary key. | ||
- `name`(string): The name is used as the name of the frontend or backend. | ||
- `frontend` or `backend` (map): This attribute's structure matches exactly the structure of a Frontend or Backend type in traefik. | ||
See `types/types.go` for details. |
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.
same here
|
||
- `id` (string): The id is the primary key. | ||
- `name`(string): The name is used as the name of the frontend or backend. | ||
- `frontend` or `backend` (map): This attribute's structure matches exactly the structure of a Frontend or Backend type in traefik. |
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.
same here
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.
LGTM
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.
LGTM
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.
LGTM 📖
- use LF for new line - remove trailing whitespaces, except two spaces at EOL in markdown - add missing new line at the end of file