Jump to content

Template:Rmanl/examples

From Meta, a Wikimedia project coordination wiki
Due to technical limitations these examples are not all on the documentation page included in the template page.

Template:Rmanl removes the newline from a string in the case that it has a combination of a newline and ":", ";", "*", or "#" as the second and third character, and returns the original string in other cases. This could be useful in the case of an undesired addition of the newline after some text starting at the ":" etc. was produced by a template, parser function, or variable (see mw:Manual:Newlines and spaces#Automatic newline).

Usage

[edit]
  • "{{rmanl|a
    :bcd}}"
    → "a:bcd" [1]
  • "{{rmanl|a
    ;bcd}}"
    → "a;bcd" [2]
  • "{{rmanl|a
    *bcd}}"
    → "a*bcd" [3]
  • "{{rmanl|a
    #bcd}}"
    → "a#bcd" [4]
  • "{{rmanl|abcd}}" → "abcd" [5]
  • "a{{#if:x|; b}}" gives "a
b" [6]
  • "{{rmanl|a{{#if:x|; b}}}}" gives "a; b"