'use strict';

const MATHOID_IMG_CLASS = 'mwe-math-fallback-image-inline';

const MediaSelectors = [
    '*[typeof^=mw:Image]',
    '*[typeof^=mw:Video]',
    '*[typeof^=mw:Audio]',
    `img.${MATHOID_IMG_CLASS}`
];

const VideoSelectors = MediaSelectors.filter(selector => selector.includes('Video'));

const PronunciationParentSelector = 'span.IPA';
const PronunciationSelector = 'a[rel=mw:MediaLink]';
const SpokenWikipediaId = '#section_SpokenWikipedia';

module.exports = {
    MediaSelectors,
    VideoSelectors,
    PronunciationParentSelector,
    PronunciationSelector,
    SpokenWikipediaId,
    MATHOID_IMG_CLASS
};

'use strict';

const MATHOID_IMG_CLASS = 'mwe-math-fallback-image-inline';

const MediaSelectors = [
    '*[typeof^="mw:Image"]',
    '*[typeof^="mw:Video"]',
    '*[typeof^="mw:Audio"]',
    `img.${MATHOID_IMG_CLASS}`
];

const VideoSelectors = MediaSelectors.filter(selector => selector.includes('Video'));

const PronunciationParentSelector = 'span.IPA';
const PronunciationSelector = 'a[rel="mw:MediaLink"]';
const SpokenWikipediaId = '#section_SpokenWikipedia';

module.exports = {
    MediaSelectors,
    VideoSelectors,
    PronunciationParentSelector,
    PronunciationSelector,
    SpokenWikipediaId,
    MATHOID_IMG_CLASS
};

Fix 'parsePronunciation' bug causing js string error w/ some articles.
Fix 'parsePronunciation' bug causing js string error w/ some articles.

Unsure why this is only happening with some articles.

Noticed when using this converter on `enwiki > Elon_Musk`:
https://github.com/wikimedia/pcs-html-converter

T242479

Change-Id: Id95a75caf2ae708b2b1559dbc475a9bd3bc29fb0
