markdown-magic
Advanced tools
Comparing version 0.1.22 to 0.1.23
@@ -48,6 +48,11 @@ "use strict" // eslint-disable-line | ||
let header = '' | ||
if (options.header) { | ||
header = `\n${options.header}` | ||
} | ||
return `<!-- The below code snippet is automatically added from ${options.src} --> | ||
\`\`\`${syntax} | ||
\`\`\`${syntax}${header} | ||
${code} | ||
\`\`\`` | ||
} |
@@ -15,2 +15,3 @@ "use strict" // eslint-disable-line | ||
* - `syntax` (optional): Syntax will be inferred by fileType if not specified | ||
* - `header` (optional): Will add header comment to code snippet. Useful for pointing to relative source directory or adding live doc links | ||
* | ||
@@ -17,0 +18,0 @@ * **Example:** |
{ | ||
"name": "markdown-magic", | ||
"version": "0.1.22", | ||
"version": "0.1.23", | ||
"description": "Automatically update markdown files with content from external sources", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -148,2 +148,3 @@ # Markdown Magic [![npm-version][npm-badge]][npm-link] | ||
- `syntax` (optional): Syntax will be inferred by fileType if not specified | ||
- `header` (optional): Will add header comment to code snippet. Useful for pointing to relative source directory or adding live doc links | ||
@@ -150,0 +151,0 @@ **Example:** |
58643
880
350