-
Notifications
You must be signed in to change notification settings - Fork 13.4k
GitHub's markdown doesn't understand commented out examples in tutorial #1514
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
Comments
These are not commented out examples, but extra code used to make the examples runnable (which is important for keeping the tutorial in sync with the language). There is no markdown mechanism I know of that would allow us to do this in a portable manner. I'm not too concerned about the tutorial looking good on github, personally. |
That's pretty cool. Is there a mechanism set up to run these as part of the build? If not, what would it entail? |
I wonder if any of the extensions graydon's been playing with (pandoc, etc) has a way to deal with comments. |
They are not run as part of the build (and there are in fact two errors currently due to
to get a list of failing fragments. |
Neat. |
I was the one who brought up this issue, because I couldn't understand the purpose of the leading hashes in the following code fragment:
"Are those syntax extensions? Attributes? Some sort of alternative commenting style?" Not being aware that the tutorial even existed on rust-lang.org, GitHub seemed the place to turn for the "official" tutorial. I don't know if I'll be the last person to make that assumption. Would it be possible for the sources to contain a comment line at the top of each, something like:
It's not really a big deal, but the syntax highlighting is very nice to have. :) |
Think I'm going to close this; adding special comment-support to the format just so that someone viewing the .md source gets redirected to the canonical home of the built docs seems like overkill. Reopen if you disagree vehemently. |
* Deserialize property IDs and rebuild them for output. * Convert property functions into methods * Put tests into tests module * Refactor format check into function * Remove redundant check * Import `super` in `tests` module * Avoid `Option<T>` and use `missing_definition` for `class` * Fix `clippy` warnings * Fix format
See: https://github.com/mozilla/rust/blob/master/doc/tutorial/syntax.md
There are code examples prefixed with # that don't appear in the website version. We should probably try to make our markdown displays correctly on github.
The text was updated successfully, but these errors were encountered: