Skip to content

Commit 6691231

Browse files
authored
docs: exposition typos
1 parent 7b197ea commit 6691231

File tree

18 files changed

+41
-41
lines changed

18 files changed

+41
-41
lines changed

doc/modules/ROOT/examples/example/qrcode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int main(int argc, char** argv)
2626
{
2727
if (argc < 2) {
2828
std::cout << argv[0] << "\n";
29-
std::cout << "Usage: qrcode <data> <width> <height> <output encoding> <error correction> <border>\n"
29+
std::cout << "Usage: qrcode <data> <width> <height> <output encoding> <error correction> <margin>\n"
3030
"options:\n"
3131
" <data>: The data to encode (required)\n"
3232
" <width>: Image width (default: 100)\n"

doc/modules/ROOT/pages/examples/magnet-link.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
`magnet` is a URL scheme for identifying files by their content.
1313
These files are usually identified by cryptographic hash value.
1414

15-
Magnet links are useful in peer-to-peer file sharing networks because they allow resources to be referred to without the need for a continuously available host..
15+
Magnet links are useful in peer-to-peer file sharing networks because they allow resources to be referred to without the need for a continuously available host.
1616

1717
This example parses a magnet link into a new view type and prints its components to standard output.
1818

doc/modules/ROOT/pages/examples/mailto.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
= mailto URLs
1111

12-
`mailto` is a URL scheme for email addresses. `mailto` URL are used on websites to allow users to email a specific address directly from an HTML document.
12+
`mailto` is a URL scheme for email addresses. `mailto` URLs are used on websites to allow users to email a specific address directly from an HTML document.
1313

1414
This example parses a mailto URL into a new view type and prints its components to standard output.
1515

doc/modules/ROOT/pages/examples/qrcode.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
= QR Code
1111

1212
A QR code is a machine-readable two-dimensional barcode.
13-
They might contain data for a identifier or a URL to a website.
13+
It might contain data for an identifier or a URL to a website.
1414

1515
This example shows how to construct and modify URLs to consume a third party API to generate QR Codes.
1616

doc/modules/ROOT/pages/examples/sanitize.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ communication.
2525

2626
Using non-strict URLs directly is a security concern in
2727
machine-to-machine communication, is ambiguous, and also
28-
involve an extra cost for the transformations.
28+
involves an extra cost for the transformations.
2929

3030
Different transformations are required by different applications to
3131
construct a valid URL appropriate for machine-to-machine communication.

doc/modules/ROOT/pages/grammar/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ to go beyond what the library offers:
1919
* Create new custom containers for other schemes
2020
* Incorporate the parsing of URLs in an enclosing grammar
2121
* Parse https://tools.ietf.org/html/rfc3986[rfc3986,window=blank_] elements in non-URL contexts
22-
(cpp:authority_view[] is an example of this).
22+
(cpp:authority_view[] is an example of this)
2323
* Define new ABNF rules used to parse non-URL strings
2424
2525
To enable these use-cases, the library provides a suite of general

doc/modules/ROOT/pages/grammar/rfc3986.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
101101

102102
== URL Rules
103103

104-
When a URL can appear in the context of a larger grammar, it may be desired to express the enclosing grammar in a single rule that incoporates the URL as an element.
104+
When a URL can appear in the context of a larger grammar, it may be desired to express the enclosing grammar in a single rule that incorporates the URL as an element.
105105
To achieve this, the library makes public the rules used to implement high-level parsing of complete strings as URL components, so that these components may be parsed as part of a larger string containing non-URL elements.
106-
Here we present a rule suitable for parsing the the HTTP
106+
Here we present a rule suitable for parsing the HTTP
107107
https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.1[__request-line__,window=blank_]:
108108

109109
[source,cpp]

doc/modules/ROOT/pages/grammar/rules.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A __Rule__ is an object which tries to match the beginning of an input character
1414
It returns a cpp:boost::system::result[] containing a value if the match was successful, or an cpp:error_code[] if the match failed.
1515
Rules are not invoked directly.
1616
Instead they are passed as values to a cpp:grammar::parse[parse] function, along with the input character buffer to process.
17-
The first overload requires that the entire input string match, otherwise else an error occurs.
17+
The first overload requires that the entire input string match, otherwise an error occurs.
1818
The second overload advances the input buffer pointer to the first unconsumed character upon success, allowing a stream of data to be parsed sequentially:
1919

2020
[source,cpp]
@@ -72,11 +72,11 @@ include::example$unit/doc_grammar.cpp[tag=code_grammar_1_6,indent=0]
7272

7373
== Error Handling
7474

75-
When a rule fails to match, or if the rule detects a unrecoverable problem with the input, it returns a result assigned from an cpp:error_code[] indicating the failure.
75+
When a rule fails to match, or if the rule detects an unrecoverable problem with the input, it returns a result assigned from an cpp:error_code[] indicating the failure.
7676
When using overloads of cpp:grammar::parse[parse] which have a character pointer as both an in and out parameter, it is up to the rule to define which character is pointed to upon error.
7777
When the rule matches successfully, the pointer is always changed to point to the first unconsumed character in the input, or to the cpp:end[] pointer if all input was consumed.
7878

79-
It is the responsibilty of library and user-defined implementations of __compound rules__ (explained later) to rewind their internal pointer if a parsing operation was unsuccessful, and they wish to attempt parsing the same input using a different rule.
79+
It is the responsibility of library and user-defined implementations of __compound rules__ (explained later) to rewind their internal pointer if a parsing operation was unsuccessful, and they wish to attempt parsing the same input using a different rule.
8080
Users who extend the library's grammar by defining their own custom rules should follow the behaviors described above regarding the handling of errors and the modification of the caller's input pointer.
8181

8282

doc/modules/ROOT/pages/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This library understands the grammars related to URLs and provides functionality
2525
== Features
2626

2727
While the library is general purpose, special care has been taken to ensure that the implementation and data representation are friendly to network programs which need to handle URLs efficiently and securely, including the case where the inputs come from untrusted sources.
28-
Interfaces are provided for using error codes instead of exceptions as needed, and most algorithms have the means to opt-out of dynamic memory allocation.
28+
Interfaces are provided for using error codes instead of exceptions as needed, and most algorithms have the means to opt out of dynamic memory allocation.
2929
Another feature of the library is that all modifications leave the URL in a valid state.
3030
Code which uses this library is easy to read, flexible, and performant.
3131

doc/modules/ROOT/pages/quicklook.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ id=42&name=John Doe Jingleheimer-Schmidt
234234
--
235235
====
236236

237-
cpp:decode_view[] and its decoding functions are designed to perform no memory allocations unless the algorithm where its being used needs the result to be in another container.
237+
cpp:decode_view[] and its decoding functions are designed to perform no memory allocations unless the algorithm where it's being used needs the result to be in another container.
238238
The design also permits recycling objects to reuse their memory, and at least minimize the number of allocations by deferring them until the result is in fact needed by the application.
239239

240240
In the example above, the memory owned by `str` can be reused to store other results.
@@ -370,7 +370,7 @@ key = name, value = John Doe
370370

371371
== Modifying
372372

373-
The library provides the containers cpp:url[] and cpp:static_url[] which supporting modification of the URL contents.
373+
The library provides the containers cpp:url[] and cpp:static_url[] supporting modification of the URL contents.
374374
A cpp:url[] or cpp:static_url[] must be constructed from an existing cpp:url_view[].
375375

376376
Unlike the cpp:url_view[], which does not gain ownership of the underlying character buffer, the cpp:url[] container uses the default allocator to control a resizable character buffer which it owns.

0 commit comments

Comments
 (0)