Difference between revisions of Module:Lang
m 1 revision imported |
Viceroy Sam (talk | contribs) m →top: Typo fixing, replaced: a args.text → an args.text, typos fixed: acceptible → acceptable (2), are are → are |
||
| 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 | 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 | 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 | 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 | 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 | ||