Skip to content

Commit

Permalink
Check documentation for double-word typos
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipHazel committed Jan 19, 2024
1 parent 6885221 commit d71e89b
Show file tree
Hide file tree
Showing 18 changed files with 653 additions and 657 deletions.
4 changes: 2 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ gets rid of the warnings. There were also two missing casts in pcre2test.
Version 10.32 10-September-2018
-------------------------------

1. When matching using the the REG_STARTEND feature of the POSIX API with a
1. When matching using the REG_STARTEND feature of the POSIX API with a
non-zero starting offset, unset capturing groups with lower numbers than a
group that did capture something were not being correctly returned as "unset"
(that is, with offset values of -1).
Expand Down Expand Up @@ -1349,7 +1349,7 @@ assumed empty second branch cannot be anchored. Demonstrated by test patterns
such as /(?(1)^())b/ or /(?(?=^))b/.

40. A repeated conditional subpattern that could match an empty string was
always assumed to be unanchored. Now it it checked just like any other
always assumed to be unanchored. Now it is checked just like any other
repeated conditional subpattern, and can be found to be anchored if the minimum
quantifier is one or more. I can't see much use for a repeated anchored
pattern, but the behaviour is now consistent.
Expand Down
2 changes: 1 addition & 1 deletion doc/html/pcre2_compile.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1>pcre2_compile man page</h1>
NULL immediately. Otherwise, the yield of this function is a pointer to a
private data structure that contains the compiled pattern, or NULL if an error
was detected. In the error case, a text error message can be obtained by
passing the value returned via the <i>errorcode</i> argument to the the
passing the value returned via the <i>errorcode</i> argument to the
<b>pcre2_get_error_message()</b> function. The offset (in code units) where the
error was encountered is returned via the <i>erroroffset</i> argument.
</P>
Expand Down
21 changes: 10 additions & 11 deletions doc/html/pcre2api.html
Original file line number Diff line number Diff line change
Expand Up @@ -1096,10 +1096,9 @@ <h1>pcre2api man page</h1>
matching can continue.
</P>
<P>
The default value for the limit can be set when PCRE2 is built; the default
default is 10 million, which handles all but the most extreme cases. A value
for the match limit may also be supplied by an item at the start of a pattern
of the form
The default value for the limit can be set when PCRE2 is built; the default is
10 million, which handles all but the most extreme cases. A value for the match
limit may also be supplied by an item at the start of a pattern of the form
<pre>
(*LIMIT_MATCH=ddd)
</pre>
Expand Down Expand Up @@ -2626,7 +2625,7 @@ <h1>pcre2api man page</h1>
A minimum of at least 1 pair is imposed by <b>pcre2_match_data_create()</b>, so
it is always possible to return the overall matched string in the case of
<b>pcre2_match()</b> or the longest match in the case of
<b>pcre2_dfa_match()</b>. The maximum number of pairs is 65535; if the the first
<b>pcre2_dfa_match()</b>. The maximum number of pairs is 65535; if the first
argument of <b>pcre2_match_data_create()</b> is greater than this, 65535 is
used.
</P>
Expand Down Expand Up @@ -3109,8 +3108,8 @@ <h1>pcre2api man page</h1>
also set to PCRE2_UNSET. For example, if the string "abc" is matched against
the pattern (abc)(x(yz)?)? groups 2 and 3 are not matched. The return from the
function is 2, because the highest used capture group number is 1. The offsets
for for the second and third capture groups (assuming the vector is large
enough, of course) are set to PCRE2_UNSET.
for the second and third capture groups (assuming the vector is large enough,
of course) are set to PCRE2_UNSET.
</P>
<P>
Elements in the ovector that do not correspond to capturing parentheses in the
Expand Down Expand Up @@ -3268,7 +3267,7 @@ <h1>pcre2api man page</h1>
<pre>
PCRE2_ERROR_NOMEMORY
</pre>
Heap memory is used to remember backgracking points. This error is given when
Heap memory is used to remember backtracking points. This error is given when
the memory allocation function (default or custom) fails. Note that a different
error, PCRE2_ERROR_HEAPLIMIT, is given if the amount of memory needed exceeds
the heap limit. PCRE2_ERROR_NOMEMORY is also returned if
Expand Down Expand Up @@ -3863,7 +3862,7 @@ <h1>pcre2api man page</h1>
match. If the value is not zero, the current replacement is not accepted. If
the value is greater than zero, processing continues when
PCRE2_SUBSTITUTE_GLOBAL is set. Otherwise (the value is less than zero or
PCRE2_SUBSTITUTE_GLOBAL is not set), the the rest of the input is copied to the
PCRE2_SUBSTITUTE_GLOBAL is not set), the rest of the input is copied to the
output and the call to <b>pcre2_substitute()</b> exits, returning the number of
matches so far.
</P>
Expand Down Expand Up @@ -4141,9 +4140,9 @@ <h1>pcre2api man page</h1>
</P>
<br><a name="SEC43" href="#TOC1">REVISION</a><br>
<P>
Last updated: 08 December 2023
Last updated: 19 January 2024
<br>
Copyright &copy; 1997-2023 University of Cambridge.
Copyright &copy; 1997-2024 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
Expand Down
16 changes: 8 additions & 8 deletions doc/html/pcre2callout.html
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,12 @@ <h1>pcre2callout man page</h1>
processed in the pattern string. When the callout is at the end of the pattern,
the length is zero. When the callout precedes an opening parenthesis, the
length includes meta characters that follow the parenthesis. For example, in a
callout before an assertion such as (?=ab) the length is 3. For an an
alternation bar or a closing parenthesis, the length is one, unless a closing
parenthesis is followed by a quantifier, in which case its length is included.
(This changed in release 10.23. In earlier releases, before an opening
parenthesis the length was that of the entire group, and before an alternation
bar or a closing parenthesis the length was zero.)
callout before an assertion such as (?=ab) the length is 3. For an alternation
bar or a closing parenthesis, the length is one, unless a closing parenthesis
is followed by a quantifier, in which case its length is included. (This
changed in release 10.23. In earlier releases, before an opening parenthesis
the length was that of the entire group, and before an alternation bar or a
closing parenthesis the length was zero.)
</P>
<P>
The <i>pattern_position</i> and <i>next_item_length</i> fields are intended to
Expand Down Expand Up @@ -471,9 +471,9 @@ <h1>pcre2callout man page</h1>
</P>
<br><a name="SEC8" href="#TOC1">REVISION</a><br>
<P>
Last updated: 03 February 2019
Last updated: 19 January 2024
<br>
Copyright &copy; 1997-2019 University of Cambridge.
Copyright &copy; 1997-2024 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
Expand Down
6 changes: 3 additions & 3 deletions doc/html/pcre2matching.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>pcre2matching man page</h1>
This document describes the two different algorithms that are available in
PCRE2 for matching a compiled regular expression against a given subject
string. The "standard" algorithm is the one provided by the <b>pcre2_match()</b>
function. This works in the same as as Perl's matching function, and provide a
function. This works in the same as Perl's matching function, and provide a
Perl-compatible matching operation. The just-in-time (JIT) optimization that is
described in the
<a href="pcre2jit.html"><b>pcre2jit</b></a>
Expand Down Expand Up @@ -244,9 +244,9 @@ <h1>pcre2matching man page</h1>
</P>
<br><a name="SEC8" href="#TOC1">REVISION</a><br>
<P>
Last updated: 28 August 2021
Last updated: 19 January 2024
<br>
Copyright &copy; 1997-2021 University of Cambridge.
Copyright &copy; 1997-2024 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
Expand Down
8 changes: 4 additions & 4 deletions doc/html/pcre2pattern.html
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ <h1>pcre2pattern man page</h1>
</P>
<P>
Perl treats a hyphen as a literal if it appears before or after a POSIX class
(see below) or before or after a character type escape such as as \d or \H.
(see below) or before or after a character type escape such as \d or \H.
However, unless the hyphen is the last character in the class, Perl outputs a
warning in its warning mode, as this is most likely a user error. As PCRE2 has
no facility for warning, an error is given in these cases.
Expand Down Expand Up @@ -3728,7 +3728,7 @@ <h1>pcre2pattern man page</h1>
fail. However, if A and B match, but C fails, the backtrack to (*THEN) causes
the next alternative (ABD) to be tried. This behaviour is consistent, but is
not always the same as Perl's. It means that if two or more backtracking verbs
appear in succession, all the the last of them has no effect. Consider this
appear in succession, all but the last of them has no effect. Consider this
example:
<pre>
...(*COMMIT)(*PRUNE)...
Expand Down Expand Up @@ -3844,9 +3844,9 @@ <h1>pcre2pattern man page</h1>
</P>
<br><a name="SEC32" href="#TOC1">REVISION</a><br>
<P>
Last updated: 12 October 2023
Last updated: 19 January 2024
<br>
Copyright &copy; 1997-2023 University of Cambridge.
Copyright &copy; 1997-2024 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
Expand Down
6 changes: 3 additions & 3 deletions doc/html/pcre2posix.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h1>pcre2posix man page</h1>
</P>
<P>
In the absence of these flags, no options are passed to the native function.
This means the the regex is compiled with PCRE2 default semantics. In
This means that the regex is compiled with PCRE2 default semantics. In
particular, the way it handles newline characters in the subject string is the
Perl way, not the POSIX way. Note that setting PCRE2_MULTILINE has only
<i>some</i> of the effects specified for REG_NEWLINE. It does not affect the way
Expand Down Expand Up @@ -370,9 +370,9 @@ <h1>pcre2posix man page</h1>
</P>
<br><a name="SEC10" href="#TOC1">REVISION</a><br>
<P>
Last updated: 14 November 2023
Last updated: 19 January 2024
<br>
Copyright &copy; 1997-2023 University of Cambridge.
Copyright &copy; 1997-2024 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
Expand Down
27 changes: 13 additions & 14 deletions doc/html/pcre2test.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ <h1>pcre2test man page</h1>
unless you really want that action.
</P>
<P>
The input is processed using using C's string functions, so must not
contain binary zeros, even though in Unix-like environments, <b>fgets()</b>
treats any bytes other than newline as data characters. An error is generated
if a binary zero is encountered. By default subject lines are processed for
backslash escapes, which makes it possible to include any data value in strings
that are passed to the library for matching. For patterns, there is a facility
for specifying some or all of the 8-bit input characters as hexadecimal pairs,
which makes it possible to include binary zeros.
The input is processed using C's string functions, so must not contain binary
zeros, even though in Unix-like environments, <b>fgets()</b> treats any bytes
other than newline as data characters. An error is generated if a binary zero
is encountered. By default subject lines are processed for backslash escapes,
which makes it possible to include any data value in strings that are passed to
the library for matching. For patterns, there is a facility for specifying some
or all of the 8-bit input characters as hexadecimal pairs, which makes it
possible to include binary zeros.
</P>
<br><b>
Input for the 16-bit and 32-bit libraries
Expand Down Expand Up @@ -1543,7 +1543,7 @@ <h1>pcre2test man page</h1>
If the <b>substitute_callout</b> modifier is set, a substitution callout
function is set up. The <b>null_context</b> modifier must not be set, because
the address of the callout function is passed in a match context. When the
callout function is called (after each substitution), details of the the input
callout function is called (after each substitution), details of the input
and output strings are output. For example:
<pre>
/abc/g,replace=&#60;$0&#62;,substitute_callout
Expand Down Expand Up @@ -1814,9 +1814,8 @@ <h1>pcre2test man page</h1>
If the strings contain any non-printing characters, they are output as \xhh
escapes if the value is less than 256 and UTF mode is not set. Otherwise they
are output as \x{hh...} escapes. See below for the definition of non-printing
characters. If the <b>aftertext</b> modifier is set, the output for substring
0 is followed by the the rest of the subject string, identified by "0+" like
this:
characters. If the <b>aftertext</b> modifier is set, the output for substring 0
is followed by the rest of the subject string, identified by "0+" like this:
<pre>
re&#62; /cat/aftertext
data&#62; cataract
Expand Down Expand Up @@ -2193,9 +2192,9 @@ <h1>pcre2test man page</h1>
</P>
<br><a name="SEC21" href="#TOC1">REVISION</a><br>
<P>
Last updated: 11 August 2023
Last updated: 19 January 2024
<br>
Copyright &copy; 1997-2023 University of Cambridge.
Copyright &copy; 1997-2024 University of Cambridge.
<br>
<p>
Return to the <a href="index.html">PCRE2 index page</a>.
Expand Down
Loading

0 comments on commit d71e89b

Please sign in to comment.