[Test] Markdown Regex

by Codi Bezouka-Smith

CSS

code {
	background: lightgray;
	margin: auto 2px;
	padding: 5px;
}

JavaScript

var str = '*text within single stars* and here is **text within double stars**. Finally, here is a `codeblock` and **more bold text**.'

str = str.replace(/\*\*(.+?)\*\*/g, '<b>$1</b>').replace(/\*(.+?)\*/g,'<i>$1</i>').replace(/`(.+?)`/g, '<code>$1</code>');

console.log(str);

document.body.innerHTML = str