Vorlage:Force last punctuation

From Offene Naturführer
Jump to: navigation, search

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:

  1. {{force last punctuation | : |Text had a dot.}} → Text had a dot:
  2. {{force last punctuation | . |Text and question mark remains? | allow = ? }} → Text and question mark remains? (force a dot if no question mark)
  3. {{force last punctuation | delete |Text had a question mark?}} → Text had a question mark

There exist also the template: remove last punctuation, which is just a wrapper to {{force last punctuation | delete |Text had a question mark?}}.