Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
`Header clicked! nextSort: ${nextSort}, sortKey: ${sortKey}`
)
}
/>
<div>
<button>Log Ref</button>
</div>
)
},
{
readme: {
content: marked(IndexListHeaderCellReadme),
},
}
)
indexListStories.add(
'IndexListBody',
() => {
const indexListBodyRef = createRef()
const logRef = (): void => {
/* eslint-disable */
console.log(indexListBodyRef.current)
/* eslint-enable */
}
return (
export const addMessage = (io, action) => {
const rawMarkup = marked(action.text);
const doc = {
username: action.username,
text: action.text,
rawMarkup,
convo: action.convo
};
Convo.findOne({name: action.convo})
.then(/* istanbul ignore next */(convo) => (_createMessage(doc, convo)))
.then(_saveConvo)
.then(/* istanbul ignore next */(result) => (_emitAddMessage(io, result)))
.catch(/* istanbul ignore next */(err) => {
logger.log('error', err);
});
};
function renderMarkdown(body: string): string {
const rendered = marked(body, { gfm: true, sanitize: true });
return rendered.replace(/<(\/?sub)>/g, '<$1>'); // TODO: is it okay?
}
list += `<br>${escape(message)}`;
});
none.forEach(({ message }) => {
list += `<br>${escape(message)}`;
});
list += '';
return list;
/* eslint-enable no-param-reassign */
}
try {
body += `${marked(`## Detailed List of Failing Tests: ${
Object.entries(reports).reduce((total, [url, report]) => total + countResults(report, 'violations'), 0)} total failing tests`)}`;
} catch (err) {
logger.error('Error counting failed tests: ', err);
body += marked('## Detailed List of Failing Tests');
}
body += '<div class="row"><div class="col-xs-12">';
function listTestResults([view, results]) {
/* eslint-disable no-param-reassign */
if (results.length > 0) {
const list = `<h4>${view.toUpperCase()}</h4><br><ol>${results.reduce((item, {
description,
nodes,
impact,
}) => {
item += `<li>${impact ? `${impact.toUpperCase()}: ` : ''}${escape(description)}<br>`;
item += '<span>Affected Nodes: </span><ul>';
item += nodes.reduce(writeNodeMessages, '');
item += '</ul></li>';
return item;</ol></div></div>
componentWillReceiveProps(nextProps) {
if (this.props.markdown !== nextProps.markdown) {
this.setState({ markdown: marked(nextProps.markdown) });
}
}
function translateMarkdown(plainText) {
return marked(plainText, {
renderer: new marked.Renderer(),
gfm: true,
pedantic: false,
sanitize: false,
tables: true,
breaks: true,
smartLists: true,
smartypants: true,
highlight: function(code) {
return hljs.highlightAuto(code).value
}
})
}
@computed get markdown () {
return marked(this.content);
}
export default function Summary({ pullRequest }) {
return (
);
}
content: (state) => {
if (state.contentPage.content) {
return marked(state.contentPage.content)
}
}
}),