Skip to content

Commit

Permalink
Correct the edit link *again*
Browse files Browse the repository at this point in the history
  • Loading branch information
j-f1 committed Aug 25, 2017
1 parent 8cdeaae commit 4c2ae71
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile.js
Expand Up @@ -683,12 +683,13 @@ target.gensite = function(prereleaseVersion) {
baseName = path.basename(filename),
sourceBaseName = `${path.basename(filename, ".md")}.js`,
sourcePath = path.join("lib/rules", sourceBaseName),
ruleName = path.basename(filename, ".md");
ruleName = path.basename(filename, ".md"),
filePath = path.join('docs', path.relative('tmp', filename));
let text = cat(filename),
title,
editLink;

process.stdout.write(`> Updating files (Steps 4-9): ${i}/${length} - ${sourcePath + " ".repeat(30)}\r`);
process.stdout.write(`> Updating files (Steps 4-9): ${i}/${length} - ${filePath + " ".repeat(30)}\n`);

// 5. Prepend page title and layout variables at the top of rules
if (path.dirname(filename).indexOf("rules") >= 0) {
Expand Down Expand Up @@ -717,7 +718,7 @@ target.gensite = function(prereleaseVersion) {
} else {
title = "Documentation";
}
editLink = `https://github.com/eslint/eslint/edit/master/${filename}`;
editLink = `https://github.com/eslint/eslint/edit/master/${filePath}`;
}

text = [
Expand Down

0 comments on commit 4c2ae71

Please sign in to comment.