-
Notifications
You must be signed in to change notification settings - Fork 161
Fix docs examples #426
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 docs examples #426
Conversation
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.
I have a few formatting comments, but otherwise LGTM.
"http://api.openweathermap.org/" + | ||
"data/2.5/weather?q=Singapore" | ||
) | ||
xhr.open("GET", "https://www.boredapi.com/api/activity") |
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.
These examples show up in the final document next to their output, and hence they only have ~40 characters a line. We should try to keep lines as short as possible:
xhr.open("GET", "https://www.boredapi.com/api/activity") | |
xhr.open("GET", | |
"https://www.boredapi.com/api/activity") |
xhr.onload = { (e: dom.Event) => | ||
if (xhr.status == 200) { | ||
pre.textContent = | ||
xhr.responseText | ||
pre.textContent = xhr.responseText |
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 problem here. The previous formatting was better for the short line width.
val url = | ||
"http://api.openweathermap.org/" + | ||
"data/2.5/weather?q=Singapore" | ||
val url = "https://www.boredapi.com/api/activity" |
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.
val url = "https://www.boredapi.com/api/activity" | |
val url = | |
"https://www.boredapi.com/api/activity" |
Makes sense. All addressed now! @sjrd |
Improvements: