Skip to content

Commit 6b73dc9

Browse files
committed
adds to description right
1 parent fdfb659 commit 6b73dc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tags.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
exports.codepen = {
33
add: function(line, curData, scope, docMap, defaultWriteProp, options) {
4-
var html = "<div class='codepen'></div>";
4+
// get the space before the line. This is so descriptions will work right.
5+
var space = line.substr(0, line.indexOf("@codepen"));
6+
var html = space+"<div class='codepen'></div>";
57
var validCurData = (curData && curData.length !== 2);
68
var useCurData = validCurData && (typeof curData.description === "string") && !curData.body;
79

@@ -11,7 +13,7 @@ exports.codepen = {
1113
}
1214

1315
if(useCurData) {
14-
curData.description += html;
16+
curData.description += "\n"+html;
1517
} else {
1618
this.body += html;
1719
}

0 commit comments

Comments
 (0)