Skip to content

Commit

Permalink
support string bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
denofevil committed Apr 2, 2018
1 parent 2af84e7 commit b91f7d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function mapContext(string) {
function convertSnippet(snippet, context) {
let vars = {};

let body = snippet.body.join("\n");
let body = typeof snippet.body === 'string' ? snippet.body : snippet.body.join("\n");
body = body.replace(/\\t/, '');
let replacement = (str, match, name, value) => {
const shortMatch = typeof value === "number" || value === undefined;
Expand Down

0 comments on commit b91f7d5

Please sign in to comment.