Created
July 4, 2018 18:03
-
-
Save jibanezvela/d8e488f8d553428031191fe5491660c2 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/civakox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="from md html"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
console.log("Hola"); | |
lineList = []; | |
lineList.push("# Hola"); | |
lineList.push("have a **nice** day"); | |
lineList.push("* tea"); | |
lineList.push("* coffe"); | |
lineList.push("* Milk"); | |
for (var line of lineList) { | |
line = line.replace(/^# (.*)$/,"<h1>$1</h1>"); | |
line = line.replace(/\*\*(\w+)\*\*/,"<b>$1</b>"); | |
line = line.replace(/^\* (.*)$/,"<li>$1</li>"); | |
console.log(line); | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">console.log("Hola"); | |
lineList = []; | |
lineList.push("# Hola"); | |
lineList.push("have a **nice** day"); | |
lineList.push("* tea"); | |
lineList.push("* coffe"); | |
lineList.push("* Milk"); | |
for (var line of lineList) { | |
line = line.replace(/^# (.*)$/,"<h1>$1</h1>"); | |
line = line.replace(/\*\*(\w+)\*\*/,"<b>$1</b>"); | |
line = line.replace(/^\* (.*)$/,"<li>$1</li>"); | |
console.log(line); | |
}</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Hola"); | |
lineList = []; | |
lineList.push("# Hola"); | |
lineList.push("have a **nice** day"); | |
lineList.push("* tea"); | |
lineList.push("* coffe"); | |
lineList.push("* Milk"); | |
for (var line of lineList) { | |
line = line.replace(/^# (.*)$/,"<h1>$1</h1>"); | |
line = line.replace(/\*\*(\w+)\*\*/,"<b>$1</b>"); | |
line = line.replace(/^\* (.*)$/,"<li>$1</li>"); | |
console.log(line); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment