@@ -12,19 +12,19 @@ in the output, when outputting HTML styling constructs (`<span style="...">`,
12
12
etc.) serve a similar purpose, and so on. It is possible to simply insert the
13
13
raw styling constructs into the string next to the content itself, but it
14
14
quickly becomes apparent that this is not well suited for anything but the most
15
- basic use- cases. Not all terminals support the same ANSI codes, the styling
15
+ basic use cases. Not all terminals support the same ANSI codes, the styling
16
16
constructs need to be painstakingly removed when calculating the width of
17
17
already-styled content, and that's before you even get into handling multiple
18
18
output formats.
19
19
20
20
Instead of leaving this headache to be widely experienced downstream, it is
21
21
tackled head-on by the introduction of a special string type
22
22
([ ` AnnotatedString ` ] (@ref Base.AnnotatedString)). This string type wraps any other
23
- [ ` AbstractString ` ] ( @ref ) type and allows for formating information to be applied to regions (e.g.
23
+ [ ` AbstractString ` ] ( @ref ) type and allows for formatting information to be applied to regions (e.g.
24
24
characters 1 through to 7 are bold and red).
25
25
26
26
Regions of a string are styled by applying [ ` Face ` ] (@ref StyledStrings.Face)s
27
- (think "typeface") to them — a structure that holds styling information . As a
27
+ (think "typeface") to them — a structure that holds styling information. As a
28
28
convenience, faces in the global faces dictionary (e.g. ` shadow ` ) can just be
29
29
named instead of giving the [ ` Face ` ] (@ref StyledStrings.Face) directly.
30
30
@@ -44,7 +44,7 @@ styled"{yellow:hello} {blue:there}"
44
44
### The ` Face ` type
45
45
46
46
A [ ` Face ` ] (@ref StyledStrings.Face) specifies details of a typeface that text can be set in. It
47
- covers a set of basic attributes that generalise well across different formats,
47
+ covers a set of basic attributes that generalize well across different formats,
48
48
namely:
49
49
50
50
- ` font `
@@ -68,7 +68,7 @@ To make referring to particular styles more convenient, there is a global
68
68
` Dict{Symbol, Face} ` that allows for [ ` Face ` ] (@ref StyledStrings.Face)s to be
69
69
referred to simply by name. Packages can add faces to this dictionary via the
70
70
[ ` addface! ` ] (@ref StyledStrings.addface!) function, and the loaded faces can be
71
- easily [ customised ] (@ref stdlib-styledstrings-face-toml).
71
+ easily [ customized ] (@ref stdlib-styledstrings-face-toml).
72
72
73
73
!!! warning "Appropriate face naming"
74
74
Any package registering new faces should ensure that they are prefixed
@@ -80,12 +80,12 @@ faces that are part of the default value of the faces dictionary.
80
80
81
81
#### [ Basic faces] (@id stdlib-styledstrings-basic-faces)
82
82
83
- Basic faces are intended represent a general idea, that is widely applicable.
83
+ Basic faces are intended to represent a general idea that is widely applicable.
84
84
85
85
For setting some text with a certain attribute, we have the ` bold ` , ` light ` ,
86
86
` italic ` , ` underline ` , ` strikethrough ` , and ` inverse ` faces.
87
87
88
- There are also named faces for the 16 terminal colours : ` black ` , ` red ` , ` green ` ,
88
+ There are also named faces for the 16 terminal colors : ` black ` , ` red ` , ` green ` ,
89
89
` yellow ` , ` blue ` , ` magenta ` , ` cyan ` , ` white ` , ` bright_black ` /` grey ` /` gray ` ,
90
90
` bright_red ` , ` bright_green ` , ` bright_blue ` , ` bright_magenta ` , ` bright_cyan ` ,
91
91
and ` bright_white ` .
@@ -95,7 +95,7 @@ selected region, there is the `region` face. Similarly for emphasis and
95
95
highlighting the ` emphasis ` and ` highlight ` faces are defined. There is also
96
96
` code ` for code-like text.
97
97
98
- For visually indicating the severity of messages the ` error ` , ` warning ` ,
98
+ For visually indicating the severity of messages, the ` error ` , ` warning ` ,
99
99
` success ` , ` info ` , ` note ` , and ` tip ` faces are defined.
100
100
101
101
### [ Customisation of faces (` Faces.toml ` )] (@id stdlib-styledstrings-face-toml)
@@ -124,7 +124,7 @@ like so:
124
124
foreground = " white"
125
125
```
126
126
127
- On initialisation , the ` config/faces.toml ` file under the first Julia depot (usually ` ~/.julia ` ) is loaded.
127
+ On initialization , the ` config/faces.toml ` file under the first Julia depot (usually ` ~/.julia ` ) is loaded.
128
128
129
129
### Applying faces to a ` AnnotatedString `
130
130
@@ -156,7 +156,7 @@ To ease construction of [`AnnotatedString`](@ref Base.AnnotatedString)s with [`F
156
156
the [ ` styled"..." ` ] (@ref @styled_str) styled string literal allows for the content and
157
157
attributes to be easily expressed together via a custom grammar.
158
158
159
- Within a [ ` styled"..." ` ] (@ref @styled_str) literal, curly parenthesis are considered
159
+ Within a [ ` styled"..." ` ] (@ref @styled_str) literal, curly braces are considered
160
160
special characters and must be escaped in normal usage (` \{ ` , ` \} ` ). This allows
161
161
them to be used to express annotations with (nestable) ` {annotations...:text} `
162
162
constructs.
@@ -195,7 +195,7 @@ As above, {code:code} is used for code-like text.
195
195
Lastly, we have the 'message severity' faces: {error:error}, {warning:warning},
196
196
{success:success}, {info:info}, {note:note}, and {tip:tip}.
197
197
198
- Remember that all these faces (and any user or package-defined ones), can
198
+ Remember that all these faces (and any user or package-defined ones) can
199
199
arbitrarily nest and overlap, {region,tip:like {bold,italic:so}}.")
200
200
```
201
201
@@ -225,7 +225,7 @@ Documenter doesn't properly represent all the styling above, so I've converted i
225
225
Lastly, we have the 'message severity' faces: <span style="color: #ed333b;">error</span>, <span style="color: #e5a509;">warning</span>,
226
226
<span style="color: #25a268;">success</span>, <span style="color: #26c6da;">info</span>, <span style="color: #76757a;">note</span>, and <span style="color: #33d079;">tip</span>.
227
227
228
- Remember that all these faces (and any user or package-defined ones), can
228
+ Remember that all these faces (and any user or package-defined ones) can
229
229
arbitrarily nest and overlap, <span style="color: #33d079;background-color: #3a3a3a;">like <span style="font-weight: 700;font-style: italic;">so</span></span>.</pre>
230
230
```
231
231
@@ -257,7 +257,7 @@ As above, {\color[HTML]{0097a7}code} is used for code-like text.
257
257
Lastly, we have the 'message severity' faces: {\color[HTML]{ed333b}error}, {\color[HTML]{e5a509}warning},\\
258
258
{\color[HTML]{25a268}success}, {\color[HTML]{26c6da}info}, {\color[HTML]{76757a}note}, and {\color[HTML]{33d079}tip}.
259
259
260
- Remember that all these faces (and any user or package-defined ones), can\\
260
+ Remember that all these faces (and any user or package-defined ones) can\\
261
261
arbitrarily nest and overlap, \colorbox[HTML]{3a3a3a}{\color[HTML]{33d079}like
262
262
{\fontseries{b}\fontshape{it}\selectfont so}}.
263
263
\endgroup
0 commit comments