Skip to content

Commit 592ede1

Browse files
committed
3081: clarify on language tags
1 parent 9f1bc51 commit 592ede1

File tree

1 file changed

+3
-5
lines changed
  • text/3081-multi-part-examples-in-rustdoc

1 file changed

+3
-5
lines changed

text/3081-multi-part-examples-in-rustdoc/index.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ A final `split-end` block must be present.
4444
Between parts, any markdown may appear, including code blocks.
4545
However, no interleaving or nesting of multi-part examples is allowed.
4646

47-
Not only _rust_ examples may be multi-part.
48-
4947
Example:
5048

5149
//! ```split-start
@@ -66,7 +64,7 @@ Example:
6664

6765
Doc-test related tags, such as `ignore` and `no-run` must be specified on the `split-start` block. Such tags specified on `split-continue` or `split-end` blocks will be ignored.
6866

69-
Language is not automatically inherited from the one in the `split-start` block. If any part has a language tag that is different than the one in the `split-start`, the documentation will fail to build.
67+
If a language tag is present, it must be the first word in the info-string and must be present in all parts of the multi-part example.
7068

7169
If `split-start` / `split-continue` / `split-end` blocks appear in an erroneous order, the documentation will fail to build.
7270

@@ -78,7 +76,6 @@ If `split-start` / `split-continue` / `split-end` blocks appear in an erroneous
7876
> - Its interaction with other features is clear.
7977
8078
- Interaction with doc-test related tags seems to be fully explained in the previous section.
81-
- Interaction with langauge tags seems to be explained, other than the specific error details.
8279

8380
> - It is reasonably clear how the feature would be implemented.
8481
@@ -89,6 +86,7 @@ TODO:
8986
- Doc-tests details such as line numbers and test names
9087
- Ordering / nesting / interleaving errors details
9188
- Inconsistent langauge error details
89+
- Details of interaction with langauge tags
9290

9391
We would like some more feedback before continuing with greater detail.
9492

@@ -118,7 +116,7 @@ Both _not permitting_ such nested single-part examples and _additional logic_ fo
118116

119117
From the guide section earlier:
120118

121-
> Language is not automatically inherited from the one in the `split-start` block. If any part has a language tag that is different than the one in the `split-start`, the documentation will fail to build.
119+
> If a language tag is present, it must be the first word in the info-string and must be present in all parts of the multi-part example.
122120
123121
An alternative to this is that specifying the language in the `split-start` block suffices and rustdoc can understand that all following parts of the multi-part example are of the same language.
124122
There is a problem with that.

0 commit comments

Comments
 (0)