Skip to content

Commit

Permalink
Fix various typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mundschenk-at committed May 16, 2024
1 parent 2403ed0 commit 77581fb
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 70 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
* _Bugfix_: Smart diacritics won't try to "correct" the spelling of `Uber` anymore.

## 6.2.1 - August 27, 2018
* _Bugfix_: French punctuation is now correctly applied to quotes preceeded or
* _Bugfix_: French punctuation is now correctly applied to quotes preceded or
followed by round and square brackets.

## 6.2.0 - August 26, 2018
Expand All @@ -93,7 +93,7 @@
- Bulgarian
- German
- German (Traditional)
- German (Swiss Tradtional)
- German (Swiss Traditional)
- Latin (Liturgical)
- Thai
* _Bugfix_: Smart quotes replacement could result in invalid unicode sequences in rare cases.
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ PHP-Typography follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.

The current stable release at the time of this writing is 6.2.0. The API has been mostly stable for a while, however some parts of it need a bit of polishing (documentation, parameter order etc.). Except for the `Settings` class, which so far remains monolithic, everything has been broken up in to self-contained smaller classes.

Partioning the `Settings` class to be more modular is conceptually difficult, but has to happen sooner or later. When it's done, there will be a 7.0.0 release. All development towards that end happens in the `7.0-dev` branch.
Partitioning the `Settings` class to be more modular is conceptually difficult, but has to happen sooner or later. When it's done, there will be a 7.0.0 release. All development towards that end happens in the `7.0-dev` branch.

**Last updated:** 2018-08-26
4 changes: 2 additions & 2 deletions src/class-dom.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static function nodelist_to_array( DOMNodeList $node_list ): array {

/**
* Retrieves an array containing all the ancestors of the node. This could be done
* via an XPath query for "ancestor::*", but DOM walking is in all likelyhood faster.
* via an XPath query for "ancestor::*", but DOM walking is in all likelihood faster.
*
* @param DOMNode $node Required.
*
Expand Down Expand Up @@ -323,7 +323,7 @@ function ( callable $is_node_acceptable, DOMNode &$another_node ): ?DOMNode {
}

/**
* Retrieves the next accceptable sibling (if there is one).
* Retrieves the next acceptable sibling (if there is one).
*
* @param callable $is_acceptable Returns true if the \DOMnode is acceptable.
* @param ?DOMNode $node Optional. The content node. Default null.
Expand Down
4 changes: 2 additions & 2 deletions src/class-php-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private function process_textnodes_internal( \DOMDocument $dom, \DOMNode $body_n
*/
$new = $textnode->data;

// Replace original node (if anthing was changed).
// Replace original node (if anything was changed).
if ( $new !== $original ) {
$this->replace_node_with_html( $textnode, $settings->apply_character_mapping( $new ) );
}
Expand Down Expand Up @@ -258,7 +258,7 @@ protected static function arrays_intersect( array $array1, array $array2 ) {
*
* @since 6.0.0 Parameter $body_classes added.
*
* @param HTML5 $parser An intialized parser object.
* @param HTML5 $parser An initialized parser object.
* @param string $html The HTML fragment to parse (not a complete document).
* @param Settings $settings The settings to apply.
* @param string[] $body_classes Optional. CSS classes added to the virtual <body>
Expand Down
2 changes: 1 addition & 1 deletion src/class-re.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private static function get_top_level_domains_from_file( $path ) {
if ( ! empty( $domains ) ) {
return \implode( '|', $domains );
} else {
return 'ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|com|coop|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw';
return 'ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|com|coop|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw'; // @spellchecker:disable-line
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ public function set_style_numbers( $on = true ): void {
}

/**
* Enables/disables wrapping of punctiation and wide characters in <span class="pull-*">.
* Enables/disables wrapping of punctuation and wide characters in <span class="pull-*">.
*
* @param bool $on Optional. Default true.
*/
Expand Down Expand Up @@ -1176,7 +1176,7 @@ public function set_hyphenation_exceptions( $exceptions = [] ): void {
* @since 5.2.0 The new parameter $raw_output has been added.
*
* @param int $max_length Optional. The maximum number of bytes returned (0 for unlimited). Default 16.
* @param bool $raw_output Optional. Wether to return raw binary data for the hash. Default true.
* @param bool $raw_output Optional. Whether to return raw binary data for the hash. Default true.
*
* @return string A binary hash value for the current settings limited to $max_length.
*/
Expand Down
32 changes: 18 additions & 14 deletions src/class-text-parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Text_Parser {
;
)
|
(?: # hexidecimal matches
(?: # hexadecimal matches
&\#x
(?: 000[9ad]|0020|00a0|1361|1680|200[0-9a]|202f|205f|3000 )
;
Expand All @@ -94,7 +94,7 @@ class Text_Parser {
private const SPACE = '(?:\s|' . self::HTML_SPACING . ')+'; // required modifiers: x (multiline pattern) i (case insensitive) $utf8.

/**
* Find punctuation and symbols before words (to capture preceeding delimiating characters like hyphens or underscores)
* Find punctuation and symbols before words (to capture preceding delimiting characters like hyphens or underscores)
*
* @see http://www.unicode.org/charts/PDF/U2000.pdf
*
Expand All @@ -112,7 +112,7 @@ class Text_Parser {
(?:
(?: # alpha matches
&
(?:quot|amp|frasl|lt|gt|iexcl|cent|pound|curren|yen|brvbar|sect|uml|pound|ordf|laquo|not|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|times|divide|circ|tilde|thetasym|upsih|piv|ndash|mdash|lsquo|rsquo|sbquo|ldquo|rdquo|bdquo|dagger|Dagger|bull|hellip|permil|prime|Prime|lsaquo|rsaquo|oline|frasl|euro|trade|alefsym|larr|uarr|rarr|darr|harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|emptyn|abla|isin|notin|ni|prod|sum|minus|lowast|radic|prop|infin|ang|and|orc|ap|cup|int|there4|simc|ong|asymp|ne|equiv|le|ge|sub|supn|sub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|lang|rang|loz|spades|clubs|hearts|diams)
(?:quot|amp|frasl|lt|gt|iexcl|cent|pound|curren|yen|brvbar|sect|uml|pound|ordf|laquo|not|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|times|divide|circ|tilde|thetasym|upsih|piv|ndash|mdash|lsquo|rsquo|sbquo|ldquo|rdquo|bdquo|dagger|Dagger|bull|hellip|permil|prime|Prime|lsaquo|rsaquo|oline|frasl|euro|trade|alefsym|larr|uarr|rarr|darr|harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|emptyn|abla|isin|notin|ni|prod|sum|minus|lowast|radic|prop|infin|ang|and|orc|ap|cup|int|there4|simc|ong|asymp|ne|equiv|le|ge|sub|supn|sub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|lang|rang|loz|spades|clubs|hearts|diams) # spellchecker:disable-line
;
)
|
Expand All @@ -122,7 +122,7 @@ class Text_Parser {
;
)
|
(?: # hexidecimal matches
(?: # hexadecimal matches
&\#x
(?: 002[1-9a-cef]|003[a-cef]|0040|005[b-e]|0060|007[b-e]|00a[1-9a-cef]|00b[0-9a-f]|00d7|00f7|02c6|02dc|03d[126]|201[3-9a-f]|202[0-7]|20[34][0-9a-f]|205[0-9a-e]|206[1-4]|20[a-c][0-9a-f]|21[0-4][0-9a-f]|219[0-9a-f]|2[23][0-9a-f][0-9a-f]|25[a-f][0-9a-f]|23[0-9a-f][0-9a-f]|2e[0-7][0-9a-f] )
;
Expand Down Expand Up @@ -165,7 +165,7 @@ class Text_Parser {
;
)
|
(?: # hexidecimal matches
(?: # hexadecimal matches
&\#x
(?: 002d|005f|00ad|200[b-d]|201[0-2] )
;
Expand Down Expand Up @@ -197,7 +197,7 @@ class Text_Parser {
;
)
|
(?: # hexidecimal matches
(?: # hexadecimal matches
(?:
&\#x00
(?: 3[1-9]|4[1-9a-f]|5[0-9a]|6[1-9a-f]|7[0-9a]|c[0-9a-f]|d[0-689]|e[0-9a-f]|f[0-689a-f] )
Expand Down Expand Up @@ -302,11 +302,11 @@ protected static function tokenize( array $parts ) {
$tokens[ $index ] = new Token( $part, Token::PUNCTUATION );
} elseif ( \preg_match( self::RE_WORD, $part ) ) {
// Make sure that things like email addresses and URLs are not broken up
// into words and punctuation not preceeded by an 'other'.
// into words and punctuation not preceded by an 'other'.
self::parse_ambiguous_token( Token::WORD, $part, $tokens, $index );
} else {
// Make sure that things like email addresses and URLs are not broken up into words
// and punctuation not preceeded by an 'other' or 'word'.
// and punctuation not preceded by an 'other' or 'word'.
self::parse_ambiguous_token( Token::OTHER, $part, $tokens, $index );
}

Expand All @@ -317,7 +317,7 @@ protected static function tokenize( array $parts ) {
}

/**
* Parse ambigious tokens (that may need to be combined with the predecessors).
* Parse ambiguous tokens (that may need to be combined with the predecessors).
*
* @param Token::WORD|Token::OTHER $expected_type The expected token type.
* @param string $part The string fragment to parse.
Expand All @@ -327,12 +327,12 @@ protected static function tokenize( array $parts ) {
protected static function parse_ambiguous_token( $expected_type, $part, array &$tokens, &$index ): void {

// Make sure that things like email addresses and URLs are not broken up incorrectly.
if ( self::is_preceeded_by( Token::OTHER, $tokens, $index ) || ( Token::OTHER === $expected_type && self::is_preceeded_by( Token::WORD, $tokens, $index ) ) ) {
if ( self::is_preceded_by( Token::OTHER, $tokens, $index ) || ( Token::OTHER === $expected_type && self::is_preceded_by( Token::WORD, $tokens, $index ) ) ) {
$old_part = $tokens[ --$index ]->value;
$tokens[ $index ] = new Token( $old_part . $part, Token::OTHER );

} elseif ( self::is_preceeded_by( Token::PUNCTUATION, $tokens, $index ) && self::is_not_preceeded_by( Token::SPACE, $tokens, $index, 2 ) ) {
// Not preceeded by a non-space + punctuation.
} elseif ( self::is_preceded_by( Token::PUNCTUATION, $tokens, $index ) && self::is_not_preceded_by( Token::SPACE, $tokens, $index, 2 ) ) {
// Not preceded by a non-space + punctuation.
$old_part = $tokens[ $index - 1 ]->value;
$older_part = $tokens[ $index - 2 ]->value;
$tokens[ $index - 2 ] = new Token( $older_part . $old_part . $part, Token::OTHER );
Expand All @@ -348,28 +348,32 @@ protected static function parse_ambiguous_token( $expected_type, $part, array &$
/**
* Checks if the predecessor of the current token is of a certain type.
*
* @since 7.0.0 Renamed to `is_preceded_by`.
*
* @param Token::* $type A valid token type (e.g. Token::WORD).
* @param Token[] $tokens An array of tokens.
* @param int $index The current token index.
* @param int $steps Optional. The number steps to go back for the check. Default 1.
*
* @return bool
*/
protected static function is_preceeded_by( $type, array $tokens, $index, $steps = 1 ) {
protected static function is_preceded_by( $type, array $tokens, $index, $steps = 1 ) {
return $index - $steps >= 0 && $type === $tokens[ $index - $steps ]->type;
}

/**
* Checks if the predecessor of the current token is not of a certain type.
*
* @since 7.0.0 Renamed to `is_not_preceded_by`.
*
* @param Token::* $type A valid token type (e.g. Token::WORD).
* @param Token[] $tokens An array of tokens.
* @param int $index The current token index.
* @param int $steps Optional. The number steps to go back for the check. Default 1.
*
* @return bool
*/
protected static function is_not_preceeded_by( $type, array $tokens, $index, $steps = 1 ) {
protected static function is_not_preceded_by( $type, array $tokens, $index, $steps = 1 ) {
return $index - $steps >= 0 && $type !== $tokens[ $index - $steps ]->type;
}

Expand Down
2 changes: 1 addition & 1 deletion src/fixes/node-fixes/class-dewidow-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Dewidow_Fix extends Abstract_Node_Fix {
const SPACE_BETWEEN = '[\s]+'; // \s includes all special spaces (but not ZWSP) with the u flag.
const WIDOW = '[\w\p{M}\-' . U::HYPHEN . U::ZERO_WIDTH_SPACE . U::SOFT_HYPHEN . ']+?'; // \w includes all alphanumeric Unicode characters but not composed characters.

// Mandatory UTF-8 modifer.
// Mandatory UTF-8 modifier.
const REGEX_START = '/
(?:
\A
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* This file is part of PHP-Typography.
*
* Copyright 2017-2022 Peter Putzer.
* Copyright 2017-2024 Peter Putzer.
*
* This program is free software; you can redistribute it and/or modify modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -43,7 +43,7 @@
class Numbered_Abbreviation_Spacing_Fix extends Simple_Regex_Replacement_Fix {
private const ISO = 'ISO(?:\/(?:IEC|TR|TS))?';
private const ABBREVIATIONS = '
### Internationl standards
### International standards
' . self::ISO . '|
### German standards
Expand Down
4 changes: 2 additions & 2 deletions src/fixes/node-fixes/class-smart-exponents-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* This file is part of PHP-Typography.
*
* Copyright 2014-2019 Peter Putzer.
* Copyright 2014-2024 Peter Putzer.
* Copyright 2009-2011 KINGdesk, LLC.
*
* This program is free software; you can redistribute it and/or modify modify
Expand Down Expand Up @@ -33,7 +33,7 @@

/**
* Applies smart exponents (if enabled).
* Purposefully seperated from smart_math because of HTML code injection.
* Purposefully separated from smart_math because of HTML code injection.
*
* @author Peter Putzer <github@mundschenk.at>
*
Expand Down
4 changes: 2 additions & 2 deletions src/fixes/node-fixes/class-smart-fractions-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* Applies smart fractions (if enabled).
*
* Call before style_numbers, but after smart_ordinal_suffix.
* Purposefully seperated from smart_math because of HTML code injection.
* Purposefully separated from smart_math because of HTML code injection.
*
* @author Peter Putzer <github@mundschenk.at>
*
Expand Down Expand Up @@ -72,7 +72,7 @@ class Smart_Fractions_Fix extends Abstract_Node_Fix {
(?:' . U::SINGLE_PRIME . '|' . U::DOUBLE_PRIME . ')?
# handle ordinals after fractions
(?:\<sup\>(?:st|nd|rd|th)<\/sup\>)?
(?:\<sup\>(?:st|nd|rd|th)<\/sup\>)? # spellchecker:disable-line
# makes sure we are not messing up a url
(?:\Z|\s|' . U::NO_BREAK_SPACE . '|' . U::NO_BREAK_NARROW_SPACE . '|\.|,|\!|\?|\)|\;|\:|\'|")
Expand Down
4 changes: 2 additions & 2 deletions src/fixes/node-fixes/class-smart-maths-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Smart_Maths_Fix extends Abstract_Node_Fix {
(\d+)' . U::MINUS . '(\d+)
' . self::FINAL_LOOKAHEAD . ' # lookahead assertion: most punctuation marks are allowd
' . self::FINAL_LOOKAHEAD . ' # lookahead assertion: most punctuation marks are allowed
(?!' . self::DECIMAL_SEPARATOR . '[0-9]+) # negative lookahead assertion: but not decimal numbers
/Sxu';

Expand All @@ -95,7 +95,7 @@ class Smart_Maths_Fix extends Abstract_Node_Fix {
' . U::DIVISION . '
(
\d+
(?:st|nd|rd|th)?
(?:st|nd|rd|th)? # spellchecker:disable-line
)
' . self::FINAL_LOOKAHEAD . '
/Sxu';
Expand Down
6 changes: 3 additions & 3 deletions src/fixes/node-fixes/class-smart-ordinal-suffix-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
class Smart_Ordinal_Suffix_Fix extends Abstract_Node_Fix {

// Possible suffixes.
const ENGLISH_SUFFIXES = 'st|nd|rd|th';
const FRENCH_SUFFIXES = 'er|re|e|ère|d|nd|nde|de|me|ème|è';
const ENGLISH_SUFFIXES = 'st|nd|rd|th'; // @spellchecker:disable-line
const FRENCH_SUFFIXES = 'er|re|e|ère|d|nd|nde|de|me|ème|è'; // @spellchecker:disable-line
const LATIN_SUFFIXES = 'o';

// Ordinals with arabic numerals.
Expand Down Expand Up @@ -123,7 +123,7 @@ public function apply( \DOMText $textnode, Settings $settings, $is_title ) {
// Always match Arabic numbers.
$patterns = [ self::RE_ARABIC_ORDINALS ];

// Only match Roman numbers if explicitely enabled.
// Only match Roman numbers if explicitly enabled.
if ( ! empty( $settings[ Settings::SMART_ORDINAL_SUFFIX_ROMAN_NUMERALS ] ) ) {
$patterns[] = self::RE_ROMAN_ORDINALS;
}
Expand Down
4 changes: 2 additions & 2 deletions src/fixes/node-fixes/class-smart-quotes-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function apply( \DOMText $textnode, Settings $settings, $is_title ) {
$this->cached_secondary_quotes = $single;
}

// Handle excpetions first.
// Handle exceptions first.
if ( ! empty( $settings[ Settings::SMART_QUOTES_EXCEPTIONS ] ) ) {
$node_data = \str_replace( $settings[ Settings::SMART_QUOTES_EXCEPTIONS ]['patterns'], $settings[ Settings::SMART_QUOTES_EXCEPTIONS ]['replacements'], $node_data );
}
Expand Down Expand Up @@ -199,7 +199,7 @@ public function apply( \DOMText $textnode, Settings $settings, $is_title ) {
$node_data
);

// Quote catch-alls - assume left over quotes are closing - as this is often the most complicated position, thus most likely to be missed.
// Quote catch-all - assume left over quotes are closing - as this is often the most complicated position, thus most likely to be missed.
$node_data = \str_replace( [ "'", '"' ], [ $single_close, $double_close ], $node_data );

// Add a thin non-breaking space between secondary and primary quotes.
Expand Down
2 changes: 1 addition & 1 deletion src/fixes/node-fixes/class-space-collapse-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function apply( \DOMText $textnode, Settings $settings, $is_title ) {
self::COLLAPSE_NORMAL_SPACES,
// Non-breakable space get's priority. If non-breakable space exists in a string of spaces, it collapses to a single non-breakable space.
self::COLLAPSE_NON_BREAKABLE_SPACES,
// For any other spaceing, replace with the first occurance of an unusual space character.
// For any other spaceing, replace with the first occurrence of an unusual space character.
self::COLLAPSE_OTHER_SPACES,
],
[ // @codeCoverageIgnoreStart
Expand Down
4 changes: 2 additions & 2 deletions src/fixes/node-fixes/class-style-caps-fix.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* This file is part of PHP-Typography.
*
* Copyright 2017 Peter Putzer.
* Copyright 2017-2024 Peter Putzer.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -42,7 +42,7 @@
*/
class Style_Caps_Fix extends Simple_Style_Fix {

// PCRE needs to be compiled with "--enable-unicode-properties", but we already depend on that elsehwere.
// PCRE needs to be compiled with "--enable-unicode-properties", but we already depend on that elsewhere.
const REGEX = '/
(?<![\w' . self::COMBINING_MARKS . ']) # negative lookbehind assertion
(
Expand Down
Loading

0 comments on commit 77581fb

Please sign in to comment.