Comparing version 0.2.1 to 0.2.2
@@ -79,2 +79,9 @@ "use strict"; | ||
}); | ||
// End-of-file marker | ||
resTokens.push({ | ||
type: "EOF", | ||
value: "", | ||
}); | ||
return resTokens; | ||
@@ -135,7 +142,19 @@ } | ||
function appendText(value) { | ||
if (content === "") { | ||
content = value; | ||
} else { | ||
content += "\n" + value; | ||
} | ||
} | ||
tokens.forEach(function (token) { | ||
if (token.type === "Plain") { | ||
appendCode(); | ||
content += "\n" + token.value; | ||
appendText(token.value); | ||
} else if (token.type === "EOF") { | ||
appendCode(); | ||
appendText(""); | ||
} else if (token.type === "Comment" && token.value.type === "Block" && token.value.value[0] === "*") { | ||
@@ -149,4 +168,3 @@ appendCode(); | ||
var value = comment.value.slice(1); | ||
content += unindent(value); | ||
appendText(unindent(value)); | ||
} else if (code) { | ||
@@ -153,0 +171,0 @@ // Code |
{ | ||
"name": "ljs", | ||
"description": "Generate docs from your source", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"homepage": "https://github.com/phadej/ljs", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -31,2 +31,3 @@ # ljs | ||
- 0.2.2 Whitespace handling for included files | ||
- 0.2.1 Dependencies update | ||
@@ -33,0 +34,0 @@ - 0.2.0 Initial release |
12953
299
71