formatter

Methods

formatPlainTextExtract(plainTextExtract, title) → {Array}static #

Improves the plain text extracts

Parameters:

Name Type Description
plainTextExtract string
title string
Source:

Returns:

Type
Array

makeTitleInExtractBold(extract, title) → {Array}inner #

Converts the extract into a list of elements, which correspond to fragments of the extract. Fragments that match the title verbatim are wrapped in a <b> element.

Using the bolded elements of the extract of the page directly is covered by T141651.

Extracted from mw.popups.renderer.article.getProcessedElements.

Parameters:

Name Type Description
extract string
title string
Source:

Returns:

A set of HTML Elements

Type
Array