-
Notifications
You must be signed in to change notification settings - Fork 13k
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
doc: cleanups #12783
Conversation
@@ -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 $$< | \ |
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.
Does prep.js --highlight
really have zero effect?
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.
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).
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.
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?
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.
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
Fixed. |
- 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.
Add basic support for `augmentsSyntaxTokens` and non-standard semantic token config cc rust-lang#12783 Closes rust-lang/rust-analyzer#13066
…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
node.js
dep., it has no effect as of rustdoc: run on plain Markdown files & replace the use of pandoc for guides/tutorial/manual etc. #12747 (1)(1):
prep.js
outputs its own HTML directives, whichpandoc
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.