Skip to content
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

Add syntax highlighting to rust-lang.org's code snippet #1518

Closed
brson opened this issue Jan 14, 2012 · 5 comments
Closed

Add syntax highlighting to rust-lang.org's code snippet #1518

brson opened this issue Jan 14, 2012 · 5 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 14, 2012

No description provided.

@marijnh
Copy link
Contributor

marijnh commented Jan 14, 2012

If somebody wants me to rewrite the CodeMirror snim I'm using in the tutorial as a general command-line utility (depending on node, of course), let me know.

@brson
Copy link
Contributor Author

brson commented Jan 14, 2012

Can we just do the syntax highlighting dynamically on the page to avoid the need to preprocess it?

@marijnh
Copy link
Contributor

marijnh commented Jan 14, 2012

We could, but I think that kind of 'pushing work and complexity of to X clients because 1 server was too lazy to do it' is extremely bad style.

@bstrie
Copy link
Contributor

bstrie commented Sep 20, 2012

This is done. I ended up just inserting the proper CodeMirror style spans manually into the code example and adding a slimmed-down version of CodeMirror's css file. So it doesn't require any complex machinery on either server or client, but the code example won't be very easy to edit (not that it should be changing often anyway).

@brson
Copy link
Contributor Author

brson commented Sep 20, 2012

Thanks, @bstrie.

@brson brson closed this as completed Sep 20, 2012
flip1995 pushed a commit to flip1995/rust that referenced this issue Jun 30, 2023
…shearth

Extend `explicit_iter_loop` and `explicit_into_iter_loop`

fixes rust-lang#1518

Some included cleanups
* Split `for_loop` test into different files for each lint (partially).
* Move handling of some `into_iter` cases from `explicit_into_iter`.

---

changelog: Enhancement: [`explicit_iter_loop`]: Now also handles types that implement `IntoIterator`.
[rust-lang#10416](rust-lang/rust-clippy#10416)

changelog: Sugg: [`explicit_into_iter_loop`]: The suggestion now works on mutable references.
[rust-lang#10416](rust-lang/rust-clippy#10416)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants