Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var _markdown = require('@storybook/addon-info/dist/components/markdown');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var defaultMarksyConf = {
h1: _markdown.H1,
h2: _markdown.H2,
h3: _markdown.H3,
h4: _markdown.H4,
h5: _markdown.H5,
h6: _markdown.H6,
code: _markdown.Code,
p: _markdown.P,
a: _markdown.A,
li: _markdown.LI,
ul: _markdown.UL
};
function renderInfoContent(content) {
var marksyConf = (0, _extends3.default)({}, defaultMarksyConf);
var markdownInfo = (0, _marksy2.default)(marksyConf, content);
if (!content || content === '' || typeof content !== 'string') {
return null;
}
var lines = content.split('\n');
while (lines[0].trim() === '') {
lines.shift();
}
var padding = 0;