Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Commit 1d2daed

Browse files
committed
fix: use new header form of generator comment
1 parent 8bebe88 commit 1d2daed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ function language_array(language_tabs) {
159159
function preProcess(content,options) {
160160
let lines = content.split('\r').join('').split('\n');
161161
const comments = [];
162+
if (options.header && options.header.generator) {
163+
comments.push('<!-- Generator: '+globalOptions.header.generator+' -->');
164+
}
162165
comments.push('<!-- Renderer: Shins v'+globalOptions.shins.version+' -->');
163166
for (let l=0;l<lines.length;l++) {
164167
let line = lines[l];
@@ -289,6 +292,7 @@ function render(inputStr, options, callback) {
289292
}
290293
var headerStr = inputArr[1];
291294
var header = yaml.parse(headerStr);
295+
globalOptions.header = header;
292296
if (!header) header = {};
293297

294298
/* non-matching languages between Ruby Rouge and highlight.js at 2016/07/10 are

0 commit comments

Comments
 (0)