/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/ require('./brewRenderer.less'); const React = require('react'); const { useState, useRef, useEffect } = React; const _ = require('lodash'); const MarkdownLegacy = require('naturalcrit/markdownLegacy.js'); const Markdown = require('naturalcrit/markdown.js'); const ErrorBar = require('./errorBar/errorBar.jsx'); //TODO: move to the brew renderer const RenderWarnings = require('homebrewery/renderWarnings/renderWarnings.jsx'); const NotificationPopup = require('./notificationPopup/notificationPopup.jsx'); const Frame = require('react-frame-component').default; const dedent = require('dedent-tabs').default; const { printCurrentBrew } = require('../../../shared/helpers.js'); import DOMPurify from 'dompurify'; const purifyConfig = { ADD_ATTR : ['id', 'target'], IGNORE_BASIC_CUSTOM_ELEMENT : true, // ignore the custom-element naming specification CUSTOM_ELEMENT_HANDLING : { tagNameCheck : ()=>{ return true; }, // all elements are allowed attributeNameCheck : null, // default / standard attribute allow-list is used allowCustomizedBuiltInElements : false, // no customized built-ins allowed }, }; const Themes = require('themes/themes.json'); const PAGE_HEIGHT = 1056; const INITIAL_CONTENT = dedent`