@@ -101,7 +101,7 @@ what an item is, how it is used, and for what purpose it exists.
101
101
Let's see an example coming from the [ standard library] by taking a look at the
102
102
[ ` std::env::args() ` ] [ env::args ] function:
103
103
104
- `````` text
104
+ `````` markdown
105
105
Returns the arguments which this program was started with (normally passed
106
106
via the command line).
107
107
@@ -135,7 +135,7 @@ for argument in env::args() {
135
135
136
136
Everything before the first empty line will be reused to describe the component
137
137
in searches and module overviews. For example, the function ` std::env::args() `
138
- above will be shown on the [ ` std::env ` ] module documentation. It is good
138
+ above will be shown on the [ ` std::env ` ] module documentation. It is good
139
139
practice to keep the summary to one line: concise writing is a goal of good
140
140
documentation.
141
141
@@ -153,9 +153,10 @@ and finally provides a code example.
153
153
154
154
## Markdown
155
155
156
- ` rustdoc ` uses the [ CommonMark markdown specification] . You might be
157
- interested into taking a look at their website to see what's possible to do.
158
- - [ commonmark quick reference]
156
+ ` rustdoc ` uses the [ CommonMark Markdown specification] . You might be
157
+ interested in taking a look at their website to see what's possible:
158
+
159
+ - [ CommonMark quick reference]
159
160
- [ current spec]
160
161
161
162
In addition to the standard CommonMark syntax, ` rustdoc ` supports several
@@ -240,6 +241,21 @@ This will render as
240
241
241
242
See the specification for the [ task list extension] for more details.
242
243
244
+ ### Smart punctuation
245
+
246
+ Some ASCII punctuation sequences will be automatically turned into fancy Unicode
247
+ characters:
248
+
249
+ | ASCII sequence | Unicode |
250
+ | ----------------| ---------|
251
+ | ` -- ` | – |
252
+ | ` --- ` | — |
253
+ | ` ... ` | … |
254
+ | ` " ` | “ or ”, depending on context |
255
+ | ` ' ` | ‘ or ’, depending on context |
256
+
257
+ So, no need to manually enter those Unicode characters!
258
+
243
259
[ `backtrace` ] : https://docs.rs/backtrace/0.3.50/backtrace/
244
260
[ commonmark markdown specification ] : https://commonmark.org/
245
261
[ commonmark quick reference ] : https://commonmark.org/help/
0 commit comments