Skip to content

Commit d6e29d3

Browse files
authored
Merge pull request #942 from Thorium/doc-fix
Update docs
2 parents b7c8f86 + 536565f commit d6e29d3

File tree

12 files changed

+61
-61
lines changed

12 files changed

+61
-61
lines changed

docs/apidocs.fsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The HTML is built by instantiating a template. The template used is the first of
6161
6262
* The default template
6363
64-
Usually the same template can be used as for [other content](content.html).
64+
Usually, the same template can be used as for [other content](content.html).
6565
6666
## Classic XML Doc Comments
6767
@@ -94,7 +94,7 @@ In addition, you may also use the [Recommended XML doc extensions for F# documen
9494
* `\(...\)` for inline math and `$$...$$` and `\[...\]`for math environments, see http://docs.mathjax.org.
9595
Some escaping of characters (e.g. `<`, `>`) may be needed to form valid XML
9696
97-
An example of an XML documentation comment, assuming the code is in namespace `TheNamespace`:
97+
An example of an XML documentation comment, assuming the code is in the namespace `TheNamespace`:
9898
*)
9999
/// <summary>
100100
/// A module
@@ -211,7 +211,7 @@ If the member cannot be found, a link to the containing module/type will be used
211211
(**
212212
### Classic XMl Doc Comments: Excluding APIs from the docs
213213
214-
If you want to exclude modules or functions from the API docs you can use the `<exclude/>` tag.
214+
If you want to exclude modules or functions from the API docs, you can use the `<exclude/>` tag.
215215
It needs to be set on a separate triple-slashed line, and can either appear on its own or as part
216216
of an existing `<summary>` (for example, you may wish to hide existing documentation while it's in progress).
217217
The `<exclude/>` tag can be the first or last line in these cases.
@@ -304,16 +304,16 @@ You can do this in two different ways:
304304
* Add a [markdown inline link](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links) were the link
305305
title is the name of the type you want to link.
306306
307-
/// this will generate a link to [Foo.Bar] documentation
307+
/// This will generate a link to [Foo.Bar] documentation
308308
309309
* Add a [Markdown inline code](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code) (using
310310
back-ticks) where the code is the name of the type you want to link.
311311
312312
/// This will also generate a link to `Foo.Bar` documentation
313313
314314
You can use either the full name (including namespace and module) or the simple name of a type.
315-
If more than one type is found with the same name the link will not be generated.
316-
If a type with the given name is not found in the same assembly the link will not be generated.
315+
If more than one type is found with the same name, the link will not be generated.
316+
If a type with the given name is not found in the same assembly, the link will not be generated.
317317
*)
318318

319319
/// Contains two types [Bar] and [Foo.Baz]
@@ -353,7 +353,7 @@ module Bar =
353353
let a = 42
354354

355355
(**
356-
Example as first line:
356+
Example as the first line:
357357
*)
358358

359359
/// [omit]
@@ -366,8 +366,8 @@ module Bar2 =
366366
367367
## Building library documentation programmatically
368368
369-
You can build library documentation programatically using the functionality
370-
in the `cref:T:FSharp.Formatting.ApiDocs.ApiDocs` type. To do this, load the assembly and open necessary namespaces:
369+
You can build library documentation programmatically using the functionality
370+
in the `cref:T:FSharp.Formatting.ApiDocs.ApiDocs` type. To do this, load the assembly and open the necessary namespaces:
371371
*)
372372

373373
#r "FSharp.Formatting.ApiDocs.dll"
@@ -414,7 +414,7 @@ ApiDocs.GenerateHtml(
414414
(**
415415
or use `libDirs` to include all assemblies from an entire folder.
416416
Tip: A combination of `<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>` in the fsproj file and setting `libDirs` to the compilation output path leads to only one folder with all dependencies referenced.
417-
This might be easier especially for large projects with many dependencies.
417+
This might be easier, especially for large projects with many dependencies.
418418
*)
419419

420420
ApiDocs.GenerateHtml(
@@ -429,7 +429,7 @@ ApiDocs.GenerateHtml(
429429
(**
430430
## Rebasing Links
431431
432-
The `root` parameter is used for the base of page and image links in the generated documentation. By default it is derived from the project's `<PackageProjectUrl>` property.
432+
The `root` parameter is used for the base of page and image links in the generated documentation. By default, it is derived from the project's `<PackageProjectUrl>` property.
433433
434434
In some instances, you may wish to override the value for `root` (perhaps for local testing). To do this, you can use the command-line argument `--parameters root <base>`.
435435

docs/codeformat.fsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This page demonstrates how to use `FSharp.Formatting.CodeFormat` to tokenize
3333
F# source code, obtain information about the source code (mainly tooltips
3434
from the type-checker) and how to turn the code into a nicely formatted HTML.
3535
36-
First, we need to load the assembly and open necessary namespaces:
36+
First, we need to load the assembly and open the necessary namespaces:
3737
*)
3838

3939
open FSharp.Formatting.CodeFormat
@@ -81,7 +81,7 @@ as those used on [fssnip.net](http://www.fssnip.net) as documented in the
8181
Working with returned tokens
8282
----------------------------
8383
84-
Each returned snippet is essentially just a collection of lines and each line
84+
Each returned snippet is essentially just a collection of lines, and each line
8585
consists of a sequence of tokens. The following snippet prints basic information
8686
about the tokens of our sample snippet:
8787
*)
@@ -106,8 +106,8 @@ for (Line (_, tokens)) in lines do
106106

107107
(**
108108
The `TokenSpan.Token` is the most important kind of token. It consists of a kind
109-
(identifier, keyword, etc.), the original F# code and tool tip information.
110-
The tool tip is further formatted using a simple document format, but we simply
109+
(identifier, keyword, etc.), the original F# code and tooltip information.
110+
The tooltip is further formatted using a simple document format, but we simply
111111
print the value using the F# pretty printing, so the result looks as follows:
112112
113113
let hello[Literal "val hello : unit -> unit"; ...] () =
@@ -165,6 +165,6 @@ If the input contains multiple snippets separated using the `//[snippet:...]` co
165165
*)
166166

167167
(**
168-
then the formatter returns multiple HTML blocks. However, the generated tool tips
168+
then the formatter returns multiple HTML blocks. However, the generated tooltips
169169
are shared by all snippets (to save space) and so they are returned separately.
170170
*)

docs/commandline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The command line options accepted are:
3030
| `--ignoreprojects` | Disable project cracking |
3131
| `--eval` | Evaluate F# fragments in scripts |
3232
| `--saveimages` | Save images referenced in docs |
33-
| `--nolinenumbers` | Don't add line numbers, default is to add line number. |
33+
| `--nolinenumbers` | Don't add line numbers, the default is to add line numbers. |
3434
| `--parameters` | Additional substitution parameters for templates |
3535
| `--nonpublic` | The tool will also generate documentation for non-public members |
3636
| `--nodefaultcontent` | Do not copy default content styles, javascript or use default templates |

docs/content.fsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Content that is not `*.fsx` or `*.md` is copied across.
6060
6161
## Default Styling Content
6262
63-
By default additional content such as `fsdocs-search.js`, `fsdocs-tips.js` and `fsdocs-default.css` are included in the
63+
By default additional content such as `fsdocs-search.js`, `fsdocs-tips.js` and `fsdocs-default.css` are included in
6464
the `content` directory of the output. This can be suppressed with `--nodefaultcontent` or by having your own
6565
copy of this content in your `content` directory.
6666
@@ -70,7 +70,7 @@ Any file or directory beginning with `.` is ignored.
7070
7171
## Front matter
7272
73-
Each content file can have optional frontmatter. This determines the navigation bar title, categorization ordering and meta tags.
73+
Each content file can have an optional frontmatter. This determines the navigation bar title, categorization ordering and meta tags.
7474
7575
For markdown, the format is:
7676
```
@@ -105,7 +105,7 @@ The `keywords` are also used in a meta tag as part of `{{fsdocs-meta-tags}}`. Se
105105

106106
## Link Translation for Inputs
107107

108-
If an input is used in markdown as a target of a markdown direct link then that is replaced by the output file. For example:
108+
If an input is used in markdown as a target of a markdown direct link, then that is replaced by the output file. For example:
109109

110110
[Some Text](some-file.md)
111111

@@ -212,12 +212,12 @@ buttons to copy out the XmlDoc signature.
212212
HTML is generated by default. You can also add a `_template.html`. This should contain `{{fsdocs-content}}`, `{{fsdocs-tooltips}}`
213213
and other placeholders. Substitutions are
214214
applied to this template.
215-
If a file `_template.html` exists then is used as the template for HTML generation for that directory and all sub-content.
215+
If a file `_template.html` exists, then it's used as the template for HTML generation for that directory and all sub-content.
216216

217217
## Generating LaTeX output
218218

219219
To generate .tex output for each script and markdown file, add a `_template.tex`. Substitutions are
220-
applied to this template. The file is either empty of contains `{{fsdocs-content}}` as the key where the body
220+
applied to this template. The file is either empty or contains `{{fsdocs-content}}` as the key where the body
221221
of the document is placed.
222222

223223
## Generating iPython Notebook output
@@ -233,7 +233,7 @@ in your `docs` directory and use text like this:
233233
## Generating Script outputs
234234

235235
To generate .fsx output for each script and markdown file, add a `_template.fsx`, usually empty. Substitutions are
236-
applied to this template. It is either empty of contains `{{fsdocs-content}}` as the key where the body
236+
applied to this template. It is either empty or contains `{{fsdocs-content}}` as the key where the body
237237
of the script is placed.
238238

239239
*)

docs/evaluation.fsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To include the meta output of F# Interactive processing such as type signatures
5858
5959
(*** include-fsi-output ***)
6060
61-
To include both console otuput and F# Interactive output blended use `(*** include-fsi-merged-output ***)`.
61+
To include both console output and F# Interactive output blended use `(*** include-fsi-merged-output ***)`.
6262
6363
let test = 40 + 4
6464
(*** include-fsi-merged-output ***)
@@ -125,7 +125,7 @@ Literate.ToHtml(doc)
125125
(**
126126
When the `fsiEvaluator` parameter is specified, the script is evaluated and so you
127127
can use additional commands such as `include-value`. When the evaluator is *not* specified,
128-
it is not created automatically and so the functionality is not available (this way,
128+
it is not created automatically, so the functionality is not available (this way,
129129
you won't accidentally run unexpected code!)
130130
131131
If you specify the `fsiEvaluator` parameter, but don't want a specific snippet to be evaluated
@@ -136,14 +136,14 @@ The constructor of `cref:T:FSharp.Formatting.Literate.Evaluation.FsiEvaluator` t
136136
be used to specify, for example, defined symbols and other attributes for F# Interactive.
137137
138138
You can also subscribe to the `EvaluationFailed` event which is fired whenever the evaluation
139-
of an expression fails. You can use that to do tests that verify that all off the code in your
139+
of an expression fails. You can use that to do tests that verify that all of the code in your
140140
documentation executes without errors.
141141
142142
F# Formatting as a Library: Custom formatting functions
143143
---------------------------
144144
145145
As mentioned earlier, values are formatted using a simple `"%A"` formatter by default.
146-
However, you can specify a formatting function that provides a nicer formatting for values
146+
However, you can specify a formatting function that provides nicer formatting for values
147147
of certain types. For example, let's say that we would want to format F# lists such as
148148
`[1; 2; 3]` as HTML ordered lists `<ol>`.
149149
@@ -158,18 +158,18 @@ fsiEvaluator.RegisterTransformation(fun (o, ty, _executionCount) ->
158158
if ty.IsGenericType
159159
&& ty.GetGenericTypeDefinition() = typedefof<list<_>> then
160160
let items =
161-
// Get items as objects and create paragraph for each item
161+
// Get items as objects and create a paragraph for each item
162162
[ for it in Seq.cast<obj> (unbox o) -> [ Paragraph([ Literal(it.ToString(), None) ], None) ] ]
163163
// Return option value (success) with ordered list
164164
Some [ ListBlock(MarkdownListKind.Ordered, items, None) ]
165165
else
166166
None)
167167
(**
168168
169-
The function is called with two arguments - `o` is the value to be formatted and `ty`
169+
The function is called with two arguments - `o` is the value to be formatted, and `ty`
170170
is the static type of the value (as inferred by the F# compiler). The sample checks
171-
that the type of the value is a list (containing values of any type) and then it
172-
casts all values in the list to `obj` (for simplicity). Then we generate Markdown
171+
that the type of the value is a list (containing values of any type), and then it
172+
casts all values in the list to `obj` (for simplicity). Then, we generate Markdown
173173
blocks representing an ordered list. This means that the code will work for both
174174
LaTeX and HTML formatting - but if you only need one, you can simply produce HTML and
175175
embed it in `InlineHtmlBlock`.

docs/literate.fsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ F# script file with `.fsx` extension. Most of the features should be quite self-
5151
List.sum numbers
5252
(*** include-it ***)
5353

54-
The F# script files is processed as follows:
54+
The F# script files are processed as follows:
5555

5656
- A multi-line comment starting with `(**` and ending with `*)` is
5757
turned into text and is processed using the F# Markdown processor
@@ -140,7 +140,7 @@ commands. Some of them are demonstrated in the following example:
140140
Console.WriteLine("Hello world!");
141141

142142
When processing the document, all F# snippets are copied to a separate file that
143-
is type-checked using the F# compiler (to obtain colours and tool tips).
143+
is type-checked using the F# compiler (to obtain colours and tooltips).
144144
The commands are written on the first line of the named snippet, wrapped in `[...]`:
145145

146146
- The `hide` command specifies that the F# snippet should not be included in the
@@ -190,7 +190,7 @@ The LaTeX will also be used in HTML and iPython notebook outputs.
190190
191191
### Making literate scripts work for different outputs
192192
193-
Literate scripts and markdown can by turned into LaTex, Python Notebooks and F# scripts.
193+
Literate scripts and markdown can be turned into LaTex, Python Notebooks and F# scripts.
194194
195195
A header may be needed to get the code to load, a typical example is this:
196196
@@ -212,9 +212,9 @@ A header may be needed to get the code to load, a typical example is this:
212212
#endif // IPYNB
213213
```
214214
215-
### Processing literate files programatically
215+
### Processing literate files programmatically
216216
217-
To process file Use the two static methods to turn single documents into HTML
217+
To process files use the two static methods to turn single documents into HTML
218218
as follows using functionality from the `cref:T:FSharp.Formatting.Literate.Literate` type:
219219
*)
220220
open System.IO
@@ -233,7 +233,7 @@ Literate.ConvertMarkdownFile(doc, template)
233233

234234
(**
235235
236-
The following sample also uses optional parameter `parameters` to specify additional
236+
The following sample also uses the optional parameter `parameters` to specify additional
237237
keywords that will be replaced in the template file (this matches the `template-project.html`
238238
file which is included as a sample in the package):
239239
*)

docs/markdown.fsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Markdown parser
2828
==============================
2929
3030
This page demonstrates how to use `FSharp.Formatting.Markdown` to parse a Markdown
31-
document, process the obtained document representation and
31+
document, process the obtained document representation, and
3232
how to turn the code into a nicely formatted HTML.
3333
34-
First, we need to load the assembly and open necessary namespaces:
34+
First, we need to load the assembly and open the necessary namespaces:
3535
*)
3636

3737
open FSharp.Formatting.Markdown
@@ -158,7 +158,7 @@ Some span nodes (like emphasis) can contain other formatting, so we need to recu
158158
process children. This is done by matching against `MarkdownPatterns.SpanNodes` which is an active
159159
pattern that recognizes any node with children. The library also provides a _function_
160160
named `MarkdownPatterns.SpanNode` that can be used to reconstruct the same node (when you want
161-
to transform document). This is similar to how the `ExprShape` module for working with
161+
to transform a document). This is similar to how the `ExprShape` module for working with
162162
F# quotations works.
163163
164164
The function `collectParLinks` processes paragraphs - a paragraph cannot directly be a

docs/sidebyside/sideextensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Example: Using the Markdown Extensions for LaTeX
99

1010
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-mml-chtml.js"></script>
1111

12-
To use LaTex extension, you need add javascript
12+
To use LaTex extension, you need to add javascript
1313
link to [MathJax](http://www.mathjax.org/) in
1414
your template or inside a `_head.html` file.
1515

@@ -21,7 +21,7 @@ To use inline LaTex, eclose LaTex code with `$`:
2121
$ k_{n+1} = n^2 + k_n^2 - k_{n-1} $. Alternatively,
2222
you can also use `$$`.
2323

24-
To use block LaTex, start a new parapgraph, with
24+
To use block LaTex, start a new paragraph, with
2525
the first line marked as `$$$` (no close `$$$`):
2626

2727
$$$

0 commit comments

Comments
 (0)