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

doc: cleanups #12783

Merged
merged 5 commits into from
Mar 11, 2014
Merged

doc: cleanups #12783

merged 5 commits into from
Mar 11, 2014

Conversation

adrientetar
Copy link
Contributor

(1): prep.js outputs its own HTML directives, which pandoc cannot recognize when converting the document into LaTeX (this is why the PDF docs have never been highlighted as of now).

Note that if we were to add the .rust class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate (here is an example of that).

(2): the only real highlighting change is for lifetimes which are now brown instead of red, the rest is just refactor of twos shades of red that look the same.
Also I made numbers highlighting for src in rustdoc a tint more clear so that it is less bothering.

@alexcrichton, @huonw

Closes #9873. Closes #12788.

@@ -168,22 +161,24 @@ ifneq ($(ONLY_HTML_DOCS),1)
DOC_TARGETS += doc/$(1).epub
doc/$(1).epub: $$(D)/$(1).md | doc/
@$$(call E, pandoc: $$@)
$$(Q)$$(CFG_NODE) $$(D)/prep.js --highlight $$< | \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does prep.js --highlight really have zero effect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because prep.js outputs its own HTML directives which pandoc cannot recognize.
You can see it as the PDF doc has never been highlighted as of now.

Note that if we were to add the .rust class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate (here is an example of that).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you put that specific information in the commit message and/or PR description so that someone looking at the gist history knows why this change happened?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

`prep.js` outputs its own HTML directives, which `pandoc` cannot
recognize when converting the document into LaTeX (this is why the
PDF docs have never been highlighted as of now).

Note that if we were to add the `.rust` class to snippets, we could
probably use pandoc's native highlighting capatibilities i.e. Kate.
- fixup and refactor highlighting code
- have a proper print stylesheet
@adrientetar
Copy link
Contributor Author

Fixed.

bors added a commit that referenced this pull request Mar 11, 2014
- remove `node.js` dep., it has no effect as of #12747 (1)
- switch between LaTeX compilers, some cleanups
- CSS: fixup the print stylesheet, refactor highlighting code (2)

(1): `prep.js` outputs its own HTML directives, which `pandoc` cannot recognize when converting the document into LaTeX (this is why the PDF docs have never been highlighted as of now).

Note that if we were to add the `.rust` class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate ([here is](http://adrientetar.github.io/rust-tuts/tutorial/tutorial.pdf) an example of that).

(2): the only real highlighting change is for lifetimes which are now brown instead of red, the rest is just refactor of twos shades of red that look the same.
Also I made numbers highlighting for src in rustdoc a tint more clear so that it is less bothering.

@alexcrichton, @huonw

Closes #9873. Closes #12788.
@bors bors closed this Mar 11, 2014
@bors bors merged commit 840a270 into rust-lang:master Mar 11, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
Add basic support for `augmentsSyntaxTokens` and non-standard semantic token config

cc rust-lang#12783
Closes rust-lang/rust-analyzer#13066
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 17, 2024
…xyas

fix: use hir_with_context to produce correct snippets for assigning_clones

The `assigning_clones` lint is producing wrong output when the assignment is a macro call.
Since Applicability level `Unspecified` will never be changed inside `hir_with_applicability`, so it is safe here to replace `hir_with_applicability` with `hir_with_context` to generate snippets of the macro call instead of the expansion.

fixes rust-lang#12776

changelog: [`assigning_clones`]: use `hir_with_context` to produce correct snippets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug report URL gives 'Access denied' doc: CodeMirror should ignore 'static/'self
4 participants