// @ts-nocheck // https://github.com/artf/codemirror-formatting/blob/master/formatting.js const inlineElements = /^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/; // for format code export function extendCodemirror(CodeMirror) { CodeMirror.extendMode('xml', { newlineAfterToken: function(type, content, textAfter, state) { let inline = false; if (this.configuration === 'html') { inline = state.context ? inlineElements.test(state.context.tagName) : false; } return !inline && ((type === 'tag' && />$/.test(content) && state.context) || /^