Skip to content

Commit 54b23f8

Browse files
mark-summerfieldKristofferC
authored andcommitted
Minor English fixes/improvements
Cherry-pick of #29370.
1 parent 8f6734b commit 54b23f8

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

doc/src/manual/documentation.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
Julia enables package developers and users to document functions, types and other objects easily
44
via a built-in documentation system since Julia 0.4.
55

6-
The basic syntax is simple: any string appearing at the top-level right before an object
7-
(function, macro, type or instance) will be interpreted as documenting it (these are called *docstrings*).
8-
Note that no blank lines or comments may intervene between a docstring and the documented object.
9-
Here is a basic example:
6+
The basic syntax is simple: any string appearing at the toplevel right before an object
7+
(function, macro, type or instance) will be interpreted as documenting it (these are called
8+
*docstrings*). Note that no blank lines or comments may intervene between a docstring and
9+
the documented object. Here is a basic example:
1010

1111
```julia
1212
"Tell whether there are too foo items in the array."
@@ -187,16 +187,16 @@ As in the example above, we recommend following some simple conventions when wri
187187
f(x, y) = ...
188188
```
189189

190-
This makes it more clear where docstrings start and end.
190+
This makes it clearer where docstrings start and end.
191191
9. Respect the line length limit used in the surrounding code.
192192

193193
Docstrings are edited using the same tools as code. Therefore, the same conventions should apply.
194-
It is advised to add line breaks after 92 characters.
194+
It is recommended that lines are at most 92 characters wide.
195195
6. Provide information allowing custom types to implement the function in an
196-
`# Implementation` section. These implementation details intended for developers
197-
rather than users, explaining e.g. which functions should be overridden and which functions
198-
automatically use appropriate fallbacks, are better kept separate from the main description of
199-
the function's behavior.
196+
`# Implementation` section. These implementation details are intended for developers
197+
rather than users, explaining e.g. which functions should be overridden and which
198+
functions automatically use appropriate fallbacks. Such details are best kept separate
199+
from the main description of the function's behavior.
200200

201201
## Accessing Documentation
202202

@@ -209,8 +209,9 @@ by typing `?` followed by the name of a function or macro, and pressing `Enter`.
209209
?r""
210210
```
211211

212-
will bring up docs for the relevant function, macro or string macro respectively. In [Juno](http://junolab.org)
213-
using `Ctrl-J, Ctrl-D` will bring up documentation for the object under the cursor.
212+
will show documentation for the relevant function, macro or string macro respectively. In
213+
[Juno](http://junolab.org) using `Ctrl-J, Ctrl-D` will show the documentation for the object
214+
under the cursor.
214215

215216
## Functions & Methods
216217

@@ -335,6 +336,7 @@ y = MyType("y")
335336
## Syntax Guide
336337

337338
A comprehensive overview of all documentable Julia syntax.
339+
338340
In the following examples `"..."` is used to illustrate an arbitrary docstring.
339341

340342
### `$` and `\` characters
@@ -520,8 +522,8 @@ the referenced value itself.
520522
sym
521523
```
522524

523-
Adds docstring `"..."` to the value associated with `sym`. Users should prefer documenting `sym`
524-
at its definition.
525+
Adds docstring `"..."` to the value associated with `sym`. However, it is preferred that
526+
`sym` is documented where it is defined.
525527

526528
### Multiple Objects
527529

@@ -551,9 +553,9 @@ two functions are related, such as non-mutating and mutating versions `f` and `f
551553
@m expression
552554
```
553555

554-
Adds docstring `"..."` to expression generated by expanding `@m expression`. This allows for expressions
555-
decorated with `@inline`, `@noinline`, `@generated`, or any other macro to be documented in the
556-
same way as undecorated expressions.
556+
Adds docstring `"..."` to the expression generated by expanding `@m expression`. This allows
557+
for expressions decorated with `@inline`, `@noinline`, `@generated`, or any other macro to
558+
be documented in the same way as undecorated expressions.
557559

558560
Macro authors should take note that only macros that generate a single expression will automatically
559561
support docstrings. If a macro returns a block containing multiple subexpressions then the subexpression

stdlib/Markdown/docs/src/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ parts of a Julia program.
4040
the text.
4141

4242
```
43-
A paragraph containing a ``` `backtick` character ```.
43+
A paragraph containing ``` `backtick` characters ```.
4444
```
4545

4646
By extension any odd number of backticks may be used to enclose a lesser number of backticks.
@@ -70,7 +70,7 @@ A paragraph containing some ``\LaTeX`` markup.
7070

7171
### Links
7272

73-
Links to either external or internal addresses can be written using the following syntax, where
73+
Links to either external or internal targets can be written using the following syntax, where
7474
the text enclosed in square brackets, `[ ]`, is the name of the link and the text enclosed in
7575
parentheses, `( )`, is the URL.
7676

@@ -127,7 +127,7 @@ in the [Inline elements](@ref) section above, with one or more blank lines above
127127
```
128128
This is a paragraph.
129129
130-
And this is *another* one containing some emphasized text.
130+
And this is *another* paragraph containing some emphasized text.
131131
A new line, but still part of the same paragraph.
132132
```
133133

@@ -316,7 +316,8 @@ aside from the `:` character that is appended to the footnote label.
316316

317317
### Horizontal rules
318318

319-
The equivalent of an `<hr>` HTML tag can be written using the following syntax:
319+
The equivalent of an `<hr>` HTML tag can be achieved using three hyphens (`---`).
320+
For example:
320321

321322
```
322323
Text above the line.

0 commit comments

Comments
 (0)