Skip to content

Commit 83f0f6e

Browse files
committedJan 31, 2014
auto merge of #11810 : Armavica/rust/issue-11645, r=alexcrichton
The doc-generating tool comments out the lines that match `/$# /` (note the space), which is not what is wanted here. And it lets live the lines matching `/$#[^ ]/`. But we still want to see a space. So I replaced the normal space by a non breakable one, which fools the parser into displaying the line.
2 parents 5a61812 + 4004493 commit 83f0f6e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed
 

‎doc/rustdoc.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,14 @@ that one can still write things like `#[deriving(Eq)]`).
139139

140140
~~~
141141
```rust
142-
# // showing 'fib' in this documentation would just be tedious and detracts from
143-
# // what's actualy being documented.
144-
# fn fib(n: int) { n + 2 }
142+
# /!\ The three following lines are comments, which are usually stripped off by
143+
# the doc-generating tool. In order to display them anyway in this particular
144+
# case, the character following the leading '#' is not a usual space like in
145+
# these first five lines but a non breakable one.
146+
#
147+
# // showing 'fib' in this documentation would just be tedious and detracts from
148+
# // what's actualy being documented.
149+
# fn fib(n: int) { n + 2 }
145150
146151
do spawn { fib(200); }
147152
```

0 commit comments

Comments
 (0)
Please sign in to comment.