There are currently 67 rules available.
Add a non-breaking space after Dr.. This binds the title and the name together and makes it easier to read.
-
With a thin non-breaking space (
\xE2\x80\xAF):- Dr. Max Mustermann + Dr.\xE2\x80\xAFMax Mustermann
-
With a non-breaking space for HTML (
):- Dr. Max Mustermann + Dr. Max Mustermann
There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceAfterDoctorRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceAfterDoctorRule.php
Add a non-breaking space after Prof.. This binds the title and the name together and makes it easier to read.
-
With a thin non-breaking space (
\xE2\x80\xAF):- Prof. Max Mustermann + Prof.\xE2\x80\xAFMax Mustermann
-
With a non-breaking space for HTML (
):- Prof. Max Mustermann + Prof. Max Mustermann
There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceAfterProfessorRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceAfterProfessorRule.php
Add non-breaking spaces before and after ampersand characters. This rule affects only situations, where the ampersand has whitespaces before and after (T & D or Tobias & Deborah).
-
With a thin non-breaking space (
\xE2\x80\xAF):- Welcome to Tobias & Deborah! + Welcome to Tobias\xE2\x80\xAF&\xE2\x80\xAFDeborah!
-
With a narrow non-breaking space for HTML (
 ):- Welcome to Tobias & Deborah! + Welcome to Tobias & Deborah!
There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBeforeAndAfterAmpersandRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBeforeAndAfterAmpersandRule.php
Add a non-breaking space between before a colon to disallow separating it from the word before.
- Concept, création et réalisation technique : Bit&Black
+ Concept, création et réalisation technique\xE2\x80\xAF: Bit&BlackThere is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBeforeColonRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBeforeColonRule.php
Add a non-breaking space between before a exclamation mark to disallow separating it from the word before.
- On y va !
+ On y va\xE2\x80\xAF!There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBeforeExclamationMarkRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBeforeExclamationMarkRule.php
Add a non-breaking space between before a question mark to disallow separating it from the word before.
- On y va ?
+ On y va\xE2\x80\xAF?There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBeforeQuestionMarkRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBeforeQuestionMarkRule.php
Add a non-breaking space between before a semicolon to disallow separating it from the word before.
- Concept, création et réalisation technique : Bit&Black
+ Concept, création et réalisation technique\xE2\x80\xAF: Bit&BlackThere is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBeforeSemicolonRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBeforeSemicolonRule.php
Add a non-breaking space before the word Uhr to disallow separating it from the time before.
- Es ist 12.30 Uhr.
+ Es ist 12.30\xC2\xA0Uhr.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBeforeUhrRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBeforeUhrRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a colon :. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Glaube mir: es war so schön!
+ Glaube mir: es\xC2\xA0war so schön!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterColonRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the colon. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterColonRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the colon. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterColonRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterColonRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a comma ,. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Glaube mir, es war so schön!
+ Glaube mir, es\xC2\xA0war so schön!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterCommaRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the comma. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterCommaRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the comma. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterCommaRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterCommaRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a dot .. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Schon vorbei. Von wegen!
+ Schon vorbei. Von\xC2\xA0wegen!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterDotRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the dot. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterDotRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the dot. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterDotRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterDotRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a em dash —. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Already over — not at all!
+ Already over — not\xC2\xA0at all!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterEmDashRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the em dash. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterEmDashRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the em dash. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterEmDashRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterEmDashRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a en dash –. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Schon vorbei – von wegen!
+ Schon vorbei – von\xC2\xA0wegen!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterEnDashRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the en dash. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterEnDashRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the en dash. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterEnDashRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterEnDashRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows an exclamation mark !. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Sicher! Ich denke nicht.
+ Sicher! Ich\xC2\xA0denke nicht.There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterExclamationMarkRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the exclamation mark. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterExclamationMarkRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the exclamation mark. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterExclamationMarkRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterExclamationMarkRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a question mark ?. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Sicher? Ich denke nicht.
+ Sicher? Ich\xC2\xA0denke nicht.There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterQuestionMarkRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the question mark. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterQuestionMarkRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the question mark. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterQuestionMarkRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterQuestionMarkRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a semicolon ;. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Glaube mir; es war so schön!
+ Glaube mir; es\xC2\xA0war so schön!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBehindWordAfterSemicolonRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the semicolon. It needs to have a length of at least
3characters per default.$addNonBreakingSpaceBehindWordAfterSemicolonRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the semicolon. By default, it must not have more than
5characters.$addNonBreakingSpaceBehindWordAfterSemicolonRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/AddNonBreakingSpaceBehindWordAfterSemicolonRule.php
Add a non-breaking space between e. and V. to disallow separating those two.
- Supersport 500 e.V.
+ Supersport 500 e.\xC2\xA0V.- Supersport 500 e. V.
+ Supersport 500 e.\xC2\xA0V.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenEingetragenerAndVereinRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenEingetragenerAndVereinRule.php
Add a thin non-breaking space between the word geb. and the following year to disallow separating them from each other. Attention: This rule may also find numbers at the beginning of a sentence, where the previous sentence ends with geb.. It should only be used manually.
- Tobias Mayer (geb. 1723)
+ Tobias Mayer (geb.\xE2\x80\xAF1723)There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenGebAndYearRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenGebAndYearRule.php
Add a thin non-breaking space between a left angle quote « and a word after to disallow separating those two.
- J'ai dit « non » à toi.
+ J'ai dit «\xE2\x80\xAFnon » à toi.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenGuillemetLeftOpenAndWordRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenGuillemetLeftOpenAndWordRule.php
Add a thin non-breaking space between a right angle quote » and a word before to disallow separating those two.
- J'ai dit « non » à toi.
+ J'ai dit « non\xE2\x80\xAF» à toi.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenGuillemetRightCloseAndWordRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenGuillemetRightCloseAndWordRule.php
Add a thin non-breaking space between a single left angle quote ‹ and a word after to disallow separating those two.
- Je t'ai dit « non », car « tout à l'heure, tu m'as dit ‹ oui › ».
+ Je t'ai dit « non », car « tout à l'heure, tu m'as dit ‹\xE2\x80\xAFoui › ».There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenGuillemetSingleLeftOpenAndWordRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenGuillemetSingleLeftOpenAndWordRule.php
Add a thin non-breaking space between a single right angle quote › and a word before to disallow separating those two.
- Je t'ai dit « non », car « tout à l'heure, tu m'as dit ‹ oui › ».
+ Je t'ai dit « non », car « tout à l'heure, tu m'as dit ‹ oui\xE2\x80\xAF› ».There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenGuillemetSingleRightCloseAndWordRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenGuillemetSingleRightCloseAndWordRule.php
Add a non-breaking space between the last and the penultimate words. Binding those words may lead to a more balanced text layout, where the last text row can't contain a single word only.
- A short last word at the end.
+ A short last word at the\xC2\xA0end.There are 2 possibilities to customize this rule:
-
Configure the maximum length for the last word. It's
6characters per default.$addNonBreakingSpaceBetweenLastAndPenultimateWords->setLastWordMaxLength($lastWordMaxLength);
-
Configure the type of the space.
$addNonBreakingSpaceBetweenLastAndPenultimateWords->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenLastAndPenultimateWords.php
Add a thin non-breaking space between the words n. and Chr. to disallow separating them from each other. Attention: This rule may also find situations, where those words mark an end and a beginning of a sentence. It should only be used manually.
- 25 n. Chr.
+ 25 n.\xE2\x80\xAFChr.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenNAndChrRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenNAndChrRule.php
Add a non-breaking space between Jahr and the number before to disallow separating those two.
- Vor 30 Jahren
+ Vor 30\xC2\xA0JahrenThere is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$addNonBreakingSpaceBetweenNumberAndJahrRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenNumberAndJahrRule.php
Add a non-breaking space between a number (ending with a dot) and the following word Jahrhundert to disallow separating them from each other. Attention: This rule may also find numbers at the end of a sentence, where the new sentence starts with the word Jahrhundert. It should only be used manually.
- Im 18. Jahrhundert
+ Im 18.\xC2\xA0JahrhundertThere is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenNumberAndJahrhundertRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenNumberAndJahrhundertRule.php
Add a non-breaking space between a number (ending with a dot) and the following word Jh. to disallow separating them from each other. Attention: This rule may also find numbers at the end of a sentence, where the new sentence starts with Jh.. It should only be used manually.
- Im 18. Jh.
+ Im 18.\xC2\xA0Jh.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenNumberAndJhRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenNumberAndJhRule.php
Add a thin non-breaking space between the words Nr. or Nummer and a following number to disallow separating them from each other.
- Das ist Nr. 8.
+ Das ist Nr.\xE2\x80\xAF8.- Das ist Nummer 8.
+ Das ist Nummer\xE2\x80\xAF8.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenNumberAndNumberRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenNumberAndNumberRule.php
Add a thin non-breaking space between a number and the following unit to disallow separating those two.
- 200 ° C
+ 200\xE2\x80\xAF° CThere is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenNumberAndUnitRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenNumberAndUnitRule.php
Add a thin non-breaking space between the words v. and Chr. to disallow separating them from each other. Attention: This rule may also find situations, where those words mark an end and a beginning of a sentence. It should only be used manually.
- 25 v. Chr.
+ 25 v.\xE2\x80\xAFChr.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenVAndChrRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenVAndChrRule.php
Add a thin non-breaking space between the words Nr. or Number and a following number to disallow separating them from each other.
- This is no. 8.
+ This is no.\xE2\x80\xAF8.- This is number 8.
+ This is number\xE2\x80\xAF8.- № 8.
+ №\xE2\x80\xAF8.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenWordNumberAndNumberRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenWordNumberAndNumberRule.php
Add a thin non-breaking space between the words n° or numéro and a following number to disallow separating them from each other.
- C'est le n° 8.
+ C'est le n°\xE2\x80\xAF8.- C'est le numéro 8.
+ C'est le numéro\xE2\x80\xAF8.- N°8
+ N°\xE2\x80\xAF8There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenWordNumeroAndNumberRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenWordNumeroAndNumberRule.php
Add a thin non-breaking space between the words Nr. or Nummer and a following number to disallow separating them from each other.
- Das ist Nr. 8.
+ Das ist Nr.\xE2\x80\xAF8.- Das ist Nummer 8.
+ Das ist Nummer\xE2\x80\xAF8.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpaceBetweenWordNummerAndNumberRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpaceBetweenWordNummerAndNumberRule.php
Add thin non-breaking spaces between the number of a dot separated date.
-
Without spaces at the beginning:
- 01.03.2025 + 1.\xE2\x80\xA3.\xE2\x80\xA2025
-
With spaces at the beginning:
- 01. 03. 2025 + 1.\xE2\x80\xA3.\xE2\x80\xA2025
-
With a narrow non-breaking space for HTML (
 ):- 01.03.2025 + 1. 3. 2025
There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$addNonBreakingSpacesForDotSeparatedDateRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/AddNonBreakingSpacesForDotSeparatedDateRule.php
Add a non-breaking space between to words that have a dash between / to allow separating those two. This can improve the text wrap when having long words-
- Von Paris/Frankreich nach Stuttgart/Deutschland.
+ Von Paris/\xC2\xADFrankreich nach Stuttgart/\xC2\xADDeutschland.There are 2 possibilities to customize this rule:
-
Configure the minimum length for the word before the dash. It needs to have a length of
3characters per default.$addSoftHyphenBetweenDashSeparatedWordsRule->setMinLengthWordBefore($minLengthWordBefore);
-
Configure the minimum length for the word after the dash. It needs to have a length of
3characters per default.$addSoftHyphenBetweenDashSeparatedWordsRule->setMinLengthWordAfter($minLengthWordAfter);
This rule is located under ../src/Rule/AddSoftHyphenBetweenDashSeparatedWordsRule.php
Add a soft hyphen to words to allow hyphenation. This can make the typeface appear calmer and leads to better utilisation of the available type width.
- Bodensee
+ Boden\xC2\xADseeThere are 5 possibilities to customize this rule:
-
Define the language code.
$addSoftHyphenToWordRule->setLanguageCode($languageCode);
-
Define the hyphenation character.
$addSoftHyphenToWordRule->setHyphen($hyphen);
-
Define, how many characters a word must have before the first hyphen may appear.
$addSoftHyphenToWordRule->setMinCharacterCountBefore($minCharacterCountBefore);
-
Define, how many characters a word must have after the last hyphen.
$addSoftHyphenToWordRule->setMinCharacterCountAfter($minCharacterCountAfter);
-
Define the minimum length a word must have to be hyphenated.
$addSoftHyphenToWordRule->setMinWordCharacterCount($minWordCharacterCount);
This rule is located under ../src/Rule/AddSoftHyphenToWordRule.php
Add a missing space behind a dot ..
- Ganz am Ende.Wie geht's weiter.
+ Ganz am Ende. Wie geht's weiter.This rule doesn't allow any customization.
This rule is located under ../src/Rule/AddSpaceBehindDotRule.php
Add a missing space behind an exclamation mark !.
- Ganz am Ende!Wie geht's weiter!
+ Ganz am Ende! Wie geht's weiter!This rule doesn't allow any customization.
This rule is located under ../src/Rule/AddSpaceBehindExclamationMarkRule.php
Add a missing space behind a question mark ?.
- Ganz am Ende?Wie geht's weiter!
+ Ganz am Ende? Wie geht's weiter!This rule doesn't allow any customization.
This rule is located under ../src/Rule/AddSpaceBehindQuestionMarkRule.php
Add a hair space between brackets. The space will be added behind left (opening) brackets and before right (closing) brackets.
- Es geht los (warum auch immer)!
+ Es geht los (\xE2\x80\x8Awarum auch immer\xE2\x80\x8A)!This rule doesn't allow any customization.
This rule is located under ../src/Rule/AddSpaceBetweenBracketsRule.php
Add a thin non-breaking space between the words Nr. or Nummer and a following number to disallow separating them from each other.
- Das ist Nr. 8.
+ Das ist Nr.\xE2\x80\xAF8.- Das ist Nummer 8.
+ Das ist Nummer\xE2\x80\xAF8.There is 1 possibility to customize this rule:
-
Configure the type of the space. Per default, a thin non-breaking space will be used.
$bindNumberToNumberRule->setNonBreakingSpace($nonBreakingSpace);
This rule is located under ../src/Rule/BindNumberToNumberRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a colon :. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Glaube mir: es war so schön!
+ Glaube mir: es\xC2\xA0war so schön!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterColonRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the colon. It needs to have a length of at least
3characters per default.$bindWordAfterColonRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the colon. By default, it must not have more than
5characters.$bindWordAfterColonRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterColonRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a comma ,. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Glaube mir, es war so schön!
+ Glaube mir, es\xC2\xA0war so schön!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterCommaRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the comma. It needs to have a length of at least
3characters per default.$bindWordAfterCommaRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the comma. By default, it must not have more than
5characters.$bindWordAfterCommaRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterCommaRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a dot .. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Schon vorbei. Von wegen!
+ Schon vorbei. Von\xC2\xA0wegen!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterDotRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the dot. It needs to have a length of at least
3characters per default.$bindWordAfterDotRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the dot. By default, it must not have more than
5characters.$bindWordAfterDotRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterDotRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a em dash —. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Already over — not at all!
+ Already over — not\xC2\xA0at all!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterEmDashRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the em dash. It needs to have a length of at least
3characters per default.$bindWordAfterEmDashRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the em dash. By default, it must not have more than
5characters.$bindWordAfterEmDashRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterEmDashRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a en dash –. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Schon vorbei – von wegen!
+ Schon vorbei – von\xC2\xA0wegen!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterEnDashRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the en dash. It needs to have a length of at least
3characters per default.$bindWordAfterEnDashRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the en dash. By default, it must not have more than
5characters.$bindWordAfterEnDashRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterEnDashRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows an exclamation mark !. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Sicher! Ich denke nicht.
+ Sicher! Ich\xC2\xA0denke nicht.There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterExclamationMarkRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the exclamation mark. It needs to have a length of at least
3characters per default.$bindWordAfterExclamationMarkRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the exclamation mark. By default, it must not have more than
5characters.$bindWordAfterExclamationMarkRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterExclamationMarkRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a question mark ?. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Sicher? Ich denke nicht.
+ Sicher? Ich\xC2\xA0denke nicht.There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterQuestionMarkRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the question mark. It needs to have a length of at least
3characters per default.$bindWordAfterQuestionMarkRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the question mark. By default, it must not have more than
5characters.$bindWordAfterQuestionMarkRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterQuestionMarkRule.php
Replace a whitespace with a non-breaking space between a short word and its following word if the short word follows a semicolon ;. This can improve the text wrap in ragged typesetting, as short words do not remain alone at the end of a line. Attention: This rule is only suitable for ragged text, not for justified text.
- Glaube mir; es war so schön!
+ Glaube mir; es\xC2\xA0war so schön!There are 3 possibilities to customize this rule:
-
Configure the type of the space. Per default, a non-breaking space will be used.
$bindWordAfterSemicolonRule->setNonBreakingSpace($nonBreakingSpace);
-
Configure the minimum length for the word after the semicolon. It needs to have a length of at least
3characters per default.$bindWordAfterSemicolonRule->setWordMaxLength($wordMaxLength);
-
Configure the maximum length for the second word after the semicolon. By default, it must not have more than
5characters.$bindWordAfterSemicolonRule->setWordAheadMaxLength($wordAheadMaxLength);
This rule is located under ../src/Rule/BindWordAfterSemicolonRule.php
Convert the characters (at) into an @ character.
- me(at)example.org
+ me@example.orgThis rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertCharactersToAtCharRule.php
Convert the characters (c) or (C) into an © character.
- (c) Bit&Black
+ © Bit&BlackThis rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertCharactersToCopyrightCharRule.php
Convert the characters (r) or (R) into an ® character.
- Apple(r)
+ Apple®This rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertCharactersToRegisteredCharRule.php
Convert the characters (tm) or (TM) into an ™ character.
- Star Wars(tm)
+ Star Wars™This rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertCharactersToTrademarkCharRule.php
Convert a dash - into an em dash — when there is whitespace before and after.
- And if so - I don't think so!
+ And if so — I don't think so!This rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertDashToEmDashRule.php
Convert a dash - into an en dash – when there is whitespace before and after.
- Und wenn schon - ich glaube nicht!
+ Und wenn schon – ich glaube nicht!This rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertDashToEnDashRule.php
Convert three or more dots ... into an ellipsis character ….
- Ich weiß nicht...
+ Ich weiß nicht…This rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertDotsToEllipsisRule.php
Recognises a measurement and inserts thin non-breaking spaces before and after the multiplication mark x or ×.
- Format: 15 x 9 cm.
+ Format: 15\xE2\x80\xAFx\xE2\x80\xAF9 cm.- Format: 15 × 9 cm.
+ Format: 15\xE2\x80\xAF×\xE2\x80\xAF9 cm.This rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertSpacesBetweenTimesAndNumbersRule.php
Convert a x character into a multiplication sign ×, when a measurement has been recognised.
- Format: 15 x 9 cm.
+ Format: 15 × 9 cm.This rule doesn't allow any customization.
This rule is located under ../src/Rule/ConvertXToTimesBetweenNumbersRule.php
An empty rule that can be configured completely by yourself. It allows you to define your own patterns using the two setter methods and stay in the spirit of this library:
$customRule = new CustomRule();
$customRule
->setSearchPattern('\s+/')
->setReplacePattern('\s')
;There are 2 possibilities to customize this rule:
-
Define the search pattern.
$customRule->setSearchPattern($searchPattern);
-
Define the replacement pattern.
$customRule->setReplacePattern($replacePattern);
This rule is located under ../src/Rule/CustomRule.php
Remove duplicated whitespace with a single space character.
- Ganz am Ende.
+ Ganz am Ende.This rule doesn't allow any customization.
This rule is located under ../src/Rule/RemoveDuplicatedWhitespaceRule.php
Remove unnecessary leading zeros from a dot separated date.
- 01.03.2025
+ 1.3.2025- 01. 03. 2025
+ 1. 3. 2025This rule doesn't allow any customization.
This rule is located under ../src/Rule/RemoveLeadingZerosFromDotSeparatedDateRule.php
Remove whitespace before a comma.
- Wir glauben , dass das Sinn macht.
+ Wir glauben, dass das Sinn macht.This rule doesn't allow any customization.
This rule is located under ../src/Rule/RemoveSpaceBeforeCommaRule.php
Remove whitespace before an exclamation mark.
- Ich glaube nicht !
+ Ich glaube nicht!This rule doesn't allow any customization.
This rule is located under ../src/Rule/RemoveSpaceBeforeExclamationMarkRule.php
Remove whitespace before a question mark.
- Glaubst du ?
+ Glaubst du?This rule doesn't allow any customization.
This rule is located under ../src/Rule/RemoveSpaceBeforeQuestionMarkRule.php
Remove duplicated exclamation marks.
- Nein! Nein!! Nein!!! Nein!!!!
+ Nein! Nein!! Nein!! Nein!!There is 1 possibility to customize this rule:
-
Configure the maximum permitted number of exclamation marks. This is
2by default.$removeUnnecessaryExclamationMarksRule->setMaxCountExclamationMark($maxCountExclamationMark);
This rule is located under ../src/Rule/RemoveUnnecessaryExclamationMarksRule.php
Remove duplicated exclamation marks.
- Nein? Nein?? Nein??? Nein????
+ Nein? Nein?? Nein?? Nein??There is 1 possibility to customize this rule:
-
Configure the maximum permitted number of question marks. This is 2 by default.
$removeUnnecessaryQuestionMarksRule->setMaxCountQuestionMark($maxCountQuestionMark);
This rule is located under ../src/Rule/RemoveUnnecessaryQuestionMarksRule.php
Remove whitespace at the beginning of a paragraph or section.
- Wir glauben, dass das Sinn macht.
+ Wir glauben, dass das Sinn macht.This rule doesn't allow any customization.
This rule is located under ../src/Rule/RemoveWhitespaceAtBeginningRule.php