Difference between revisions of Module:Lang

en>Trappist the monk
remove deprecated entry points;
 
Viceroy Sam (talk | contribs)
m top: Typo fixing, replaced: a args.text → an args.text, typos fixed: acceptible → acceptable (2), are are → are
 
(One intermediate revision by one other user not shown)
Line 40: Line 40:
--[[--------------------------< I N V E R T  _ I T A L I C S >-------------------------------------------------
--[[--------------------------< I N V E R T  _ I T A L I C S >-------------------------------------------------


This function attempts to invert the italic markup a args.text by adding/removing leading/trailing italic markup
This function attempts to invert the italic markup an args.text by adding/removing leading/trailing italic markup
in args.text.  Like |italic=unset, |italic=invert disables automatic italic markup.  Individual leading/trailing
in args.text.  Like |italic=unset, |italic=invert disables automatic italic markup.  Individual leading/trailing
apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become
apostrophes are converted to their html numeric entity equivalent so that the new italic markup doesn't become
Line 88: Line 88:
validates |italic= or |italics= assigned values.
validates |italic= or |italics= assigned values.


When |italic= is set and has an acceptible assigned value, return the matching css font-style property value or,
When |italic= is set and has an acceptable assigned value, return the matching css font-style property value or,
for the special case 'default', return nil.
for the special case 'default', return nil.


When |italic= is not set, or has an unacceptible assigned value, return nil and a nil error message.
When |italic= is not set, or has an unacceptable assigned value, return nil and a nil error message.


When both |italic= and |italics= are set, returns nil and a 'conflicting' error message.
When both |italic= and |italics= are set, returns nil and a 'conflicting' error message.
Line 100: Line 100:
and {{lang-xx}} only).
and {{lang-xx}} only).


Accepted values and the values that this function returns are are:
Accepted values and the values that this function returns are:
nil - when |italic= absent or not set; returns nil
nil - when |italic= absent or not set; returns nil
default - for completeness, should rarely if ever be used; returns nil
default - for completeness, should rarely if ever be used; returns nil