PCRE2Project / pcre2

PCRE2 development is now based here.
Other
921 stars 194 forks source link

Fix various typos in documentation #372

Closed Mango0x45 closed 10 months ago

Mango0x45 commented 10 months ago

Most of these typos were found with the following command:

find doc -type f -exec aspell -c {} \;
carenas commented 10 months ago

since the html and txt files are generated from the man pages (see PrepareRelease) it would be better IMHO to also do -name "*.3"

noticed some duplicated words that were visible in your modified text, so it might be worth doing a few additional passes or a proof read additionally.

Mango0x45 commented 10 months ago

Fixed the for for typo and did a second pass with the automated check (didn’t find any new typos).

For the for for typo I didn’t bother changing the txt and HTML sources seeing as they’re apparently autogenerated.

PhilipHazel commented 10 months ago

OK, I've merged this pull request as the easiest thing to do, but I will re-generate the HTML and .txt. I have also been prodded into checking for doubles like "the the", using a script I got from Jeffrey Friedl. Here it is:

# Jeffrey Friedl's script for checking for duplicate words
# Modified to ignore lines starting with dots

$/ = ".\n";
 while (<>) {
   s/^\..*//mg;            # Remove lines that start with .
   next if !s/\b([a-z]+)((?:\s|<[^>]+>)+)(\1\b)/\e[7m$1\e[m$2\e[7m$3\e[m/ig;
   s/^(?:[^\e]*\n)+//mg;   # Remove any unmarked lines
   s/^/$ARGV: /mg;         # Ensure lines begin with filename
   print;
 }

Having run this, I've found a few, which I will now edit. Thanks for doing the checking. Note that .1 files need checking as well as .3.