Skip to content

Commit a5b3037

Browse files
committed
Add ability to specify tag type
2 parents b55a6f3 + e44a467 commit a5b3037

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>simple-snippets-console</title>
6+
<style>
7+
body {
8+
font-family: sans-serif;
9+
}
10+
</style>
11+
<body>
12+
<p><a href="https://github.com/tjcrowder/simple-snippets-console">Details in the github project</a></p>
13+
</body>
14+
</html>

snippet.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ var snippet = {
1212
msg = msg.join();
1313
} else if (typeof object === "object") {
1414
msg = msg === null ? "null" : JSON.stringify(msg);
15+
} else {
16+
msg = String(msg);
1517
}
1618
elm.innerHTML = msg.replace(/&/g, '&amp;').replace(/</g, '&lt;');
1719
document.body.appendChild(elm);

0 commit comments

Comments
 (0)