Vorlage:Force last punctuation: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Fix this_text_with_forced_character) |
(+example: Text had no dot or other punctuation) |
||
Zeile 88: | Zeile 88: | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>| : |Text had a dot.}}</nowiki> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>| : |Text had a dot.}}</nowiki> | ||
| {{ {{PAGENAME}}| : |Text had a dot.}} | | {{ {{PAGENAME}}| : |Text had a dot.}} | ||
+ | |- | ||
+ | | | ||
+ | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>| : |Text had no dot or other punctuation}}</nowiki> | ||
+ | | {{ {{PAGENAME}}| : |Text had no dot or other punctuation}} | ||
|- | |- | ||
| | | |
Version vom 17. April 2020, 12:23 Uhr
This template checks for the last punctuation character and removes it if there should be comma (,) colon (:) semicolon (;) exclamation mark (!) question mark (?) or a dot (.). So it forces to be there one of these characters. But it can also remove the last character. Examples:
Code | Result |
---|---|
{{Force last punctuation| : |Text had a dot.}} |
Text had a dot. |
{{Force last punctuation| : |Text had no dot or other punctuation}} |
Text had no dot or other punctuatio: |
{{Force last punctuation| . |Text and question mark remains? | allow = ?! }} |
Text and question mark remains? |
{{Force last punctuation| delete |Text had a question mark? }} |
Text had a question mark |
{{Force last punctuation| delete |Text had no final .;:!? or so … }} |
Text had no final .;:!? or so … |
There exist also the template: remove last punctuation, which is just a wrapper to {{force last punctuation | delete |Text had a question mark?}}
.
Dependencies