Module:Extract short description: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 52:
text = text:gsub ('<ref[^>]->[^<]-</ref>', ''); -- delete references before preprocessing; they do not belong in shortdesc text
text = text:gsub ('<ref[^>]-/ *>', ''); -- also delete self-closed named references
text = text:gsub ('{{%s*sfn[^}]-}}', ''); -- delete sfn template which make references using {{#tag:}} parser functions
text = text:gsub ('{{#tag:ref[^}]-}}', ''); -- and delete these too
 
text = frame:preprocess (text):match ('<div[^>]-class="shortdescription.->(.-)</div>'); -- preprocess and extract shortdescription text