AddNewline

Summary: Make wiki text end with a newline character, so the last line won't be marked as changed if text is added at the bottom
Version: 2006-01-29
Prerequisites: Last tested on PmWiki version: pmwiki-2.1.beta22
Status:
Maintainer: floozy
Discussion: AddNewline-Talk?

Question

Diffs are more useful if the wiki text ends with a newline character, so the last line won't be marked as changed if text is added at the bottom. How to achieve this?

Answer

Add the following code to your local/config.php:

    $ROSPatterns["/\n*$/"] = "\n";

Contributors

  • floozy, 2006-01-29, Initial version

Comments

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.