Module:Su: Difference between revisions

wrapped output in semantic <sup> and <sub> tags, simplified and/or logic
m (1 revision imported)
en>Matt Fitzpatrick
(wrapped output in semantic <sup> and <sub> tags, simplified and/or logic)
Line 40:
if options.fontSize == 'f' or options.fontSize == 'fixed' then
span:css{
['font-family'] = 'monospace,monospace',
['font-size'] = '80%'
}
else
span:css('font-size', options.fontSize and options.fontSize or '80%')
end
if options.align == 'r' or options.align == 'right' then
Line 56:
-- Add the wikitext.
span
:wikitexttag('sup')
:css('font-size', 'inherit')
:css('line-height', 'inherit')
:css('vertical-align', 'baseline')
:wikitext(sup)
:done()
:tag('br', {selfClosing = true}):done()
:wikitexttag('sub')
:css('font-size', 'inherit')
:css('line-height', 'inherit')
:css('vertical-align', 'baseline')
:wikitext(sub)
return tostring(span)
Anonymous user