Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Sep 18, 2023

Fixes #115938.

This PR does two things:

  1. Unless the custom_code_classes_in_docs feature is enabled, it will use the old codeblock tag parser.
  2. If there is a codeblock tag that starts with a ., it will emit a behaviour change warning.

Hopefully this is the last missing part for this feature until stabilization.

Follow-up of #110800.

r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 18, 2023
@rustbot
Copy link
Collaborator

rustbot commented Sep 18, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@GuillaumeGomez GuillaumeGomez force-pushed the custom_code_classes_in_docs-warning branch from 46e7b41 to 1ac06dd Compare September 18, 2023 20:24
@notriddle
Copy link
Contributor

notriddle commented Sep 18, 2023

Could this be adjusted so that ASN.1 works, even when custom classes are turned on? The current system only strips a leading dot, and the new system requires spaces between classes (.foo.bar isn't valid), so there's no real reason for it to be a problem.

In the sample grammar, that means changing the syntax for barewords.

-bareword = CHAR *(CHAR)
+bareword = LEADINGCHAR *(CHAR)
-CHAR = ALPHA / DIGIT / "_" / "-" / ":"
+LEADINGCHAR = ALPHA / DIGIT / "_" / "-" / ":"
+; all ASCII punctuation except comma, quote, equals, backslash, grave (backquote), and braces
+; comma is used to separate language tokens, so it can't be used in one
+; quote is used to allow otherwise-disallowed characters in language tokens
+; equals is used to make key=value pairs in attribute blocks
+; backslash and grave are special Markdown characters
+; braces are used to start an attribute block
+CHAR = ALPHA / DIGIT / "_" / "-" / ":" / "." / "!" / "#" / "$" / "%" / "&" / "*" / "+" / "/" / ";" / "<" / ">" / "?" / "@" / "^" / "|" / "~"

@GuillaumeGomez
Copy link
Member Author

Sounds good to me as well. I'll update it tomorrow then.

@GuillaumeGomez GuillaumeGomez force-pushed the custom_code_classes_in_docs-warning branch from 1ac06dd to 295ec09 Compare September 19, 2023 15:30
@GuillaumeGomez
Copy link
Member Author

I modified the eBNF as suggested.

@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 19, 2023

📌 Commit 295ec09 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2023
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#113383 (style-guide: Add section on bugs, and resolving bugs)
 - rust-lang#115499 (rustc_target/riscv: Fix passing of transparent unions with only one non-ZST member)
 - rust-lang#115801 (Detect cycle errors hidden by opaques during monomorphization)
 - rust-lang#115947 (Custom code classes in docs warning)
 - rust-lang#115957 (fix mismatched symbols)
 - rust-lang#115958 (explain mysterious addition in float minimum/maximum)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 52a0d13 into rust-lang:master Sep 19, 2023
@rustbot rustbot added this to the 1.74.0 milestone Sep 19, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2023
Rollup merge of rust-lang#115947 - GuillaumeGomez:custom_code_classes_in_docs-warning, r=notriddle

Custom code classes in docs warning

Fixes rust-lang#115938.

This PR does two things:
 1. Unless the `custom_code_classes_in_docs` feature is enabled, it will use the old codeblock tag parser.
 2. If there is a codeblock tag that starts with a `.`, it will emit a behaviour change warning.

Hopefully this is the last missing part for this feature until stabilization.

Follow-up of rust-lang#110800.

r? `@notriddle`
@GuillaumeGomez GuillaumeGomez deleted the custom_code_classes_in_docs-warning branch September 19, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nightly warning for codeblock languages with non-alphanumeric characters
4 participants