Prism.languages.markup = { 'comment': { pattern: //, greedy: true }, 'prolog': { pattern: /<\?[\s\S]+?\?>/, greedy: true }, 'doctype': { // https://www.w3.org/TR/xml/#NT-doctypedecl pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, greedy: true, inside: { 'internal-subset': { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: true, greedy: true, inside: null // see below }, 'string': { pattern: /"[^"]*"|'[^']*'/, greedy: true }, 'punctuation': /^$|[[\]]/, 'doctype-tag': /^DOCTYPE/i, 'name': /[^\s<>'"]+/ } }, 'cdata': { pattern: //i, greedy: true }, 'tag': { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: true, inside: { 'tag': { pattern: /^<\/?[^\s>\/]+/, inside: { 'punctuation': /^<\/?/, 'namespace': /^[^\s>\/:]+:/ } }, 'special-attr': [], 'attr-value': { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { 'punctuation': [ { pattern: /^=/, alias: 'attr-equals' }, { pattern: /^(\s*)["']|["']$/, lookbehind: true } ] } }, 'punctuation': /\/?>/, 'attr-name': { pattern: /[^\s>\/]+/, inside: { 'namespace': /^[^\s>\/:]+:/ } } } }, 'entity': [ { pattern: /&[\da-z]{1,8};/i, alias: 'named-entity' }, /&#x?[\da-f]{1,8};/i ] }; Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity']; Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup; // Plugin to make entity title show the real entity, idea by Roman Komarov Prism.hooks.add('wrap', function (env) { if (env.type === 'entity') { env.attributes['title'] = env.content.replace(/&/, '&'); } }); Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { /** * Adds an inlined language to markup. * * An example of an inlined language is CSS with `