10,735
edits
TheNightAvl (talk | contribs) m (Added *bolding* functionality) |
TheNightAvl (talk | contribs) No edit summary |
||
Line 21: | Line 21: | ||
local translation = gloss and (inline and (" ― " .. gloss) or ("<dl><dd>" .. gloss .. "</dd></dl>")) or "" | local translation = gloss and (inline and (" ― " .. gloss) or ("<dl><dd>" .. gloss .. "</dd></dl>")) or "" | ||
local cats = nocat and "" or ("[[Category:" .. language.name .. " terms with usage examples]]") | local cats = nocat and "" or ("[[Category:" .. language.name .. " terms with usage examples]]") | ||
return '<div class="h-example">' .. m_formatting.wrap_face(mw.ustring.gsub(sentence,"*","'''"), language, "example") .. mw.ustring.gsub(translation,"*","'''") .. '</div>' .. cats | return '<div class="h-example">' .. m_formatting.wrap_face(mw.ustring.gsub(sentence,"%*([^%*]+)*","'''%1'''"), language, "example") .. mw.ustring.gsub(translation,"%*([^%*]+)*","'''%1'''") .. '</div>' .. cats | ||
end | end | ||