Skip to content

Commit 1154bff

Browse files
authored
Merge pull request #39 from GuillaumeGomez/fixes
Fix broken links and invalid code blocks
2 parents f513a22 + 0b89f94 commit 1154bff

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
- [Documentation](./documentation/summary.md)
4949
- [doc alias policy](./documentation/doc-alias-policy.md)
5050
- [safety comments policy](./documentation/safety-comments.md)
51-
- [how to write documentation](./how-to-write-documentation.md)
52-
- [reviewing doc changes](./reviewing-doc-changes.md)
51+
- [how to write documentation](./documentation/how-to-write-documentation.md)
52+
- [reviewing doc changes](./documentation/reviewing-doc-changes.md)
5353

5454
---
5555

src/documentation/how-to-write-documentation.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ blocks by default). It allows us to know if the documentation is up to date. As
6060
such, please avoid using `ignore` as much as possible on code blocks! If you
6161
want as a language other than Rust, simply set it in the code block tags:
6262

63-
```text
64-
This is not rust code!
65-
```
63+
````text
64+
```text
65+
This is not rust code!
66+
```
67+
````
6668

6769
Some special cases:
6870
* If the code example cannot be run (when documenting a I/O item for example),
@@ -99,7 +101,7 @@ The basic format of each documented methods/functions should roughly look like t
99101
By `explanations` we mean that the text should explain what the method and what
100102
each of its arguments are for. Let's take this method for example:
101103

102-
```rust
104+
```rust,ignore
103105
pub fn concat_str(&self, s: &str) -> String {
104106
if s.is_empty() {
105107
panic!("empty concat string");
@@ -134,12 +136,14 @@ It is better if you use `assert*!` macros at the end to ensure that the example
134136
is working as expected. It also allows the readers to understand more easily
135137
what the function is doing (or returning).
136138

137-
# Examples
139+
````text
140+
# Examples
138141
139-
```
140-
let s = MyType::new("hello ");
141-
assert_eq!("hello Georges", s.concat_str("Georges").as_str());
142-
```
142+
```
143+
let s = MyType::new("hello ");
144+
assert_eq!("hello Georges", s.concat_str("Georges").as_str());
145+
```
146+
````
143147

144148
## How to write documentation for other items
145149

0 commit comments

Comments
 (0)