Skip to content

Commit

Permalink
minor style and naming nits
Browse files Browse the repository at this point in the history
  • Loading branch information
thlorenz committed Jan 19, 2015
1 parent 83e9869 commit 10d09d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ exports = module.exports = function transform(content, mode, maxHeaderNo) {
if (linkedHeaders.length === 0) return { transformed: false };

// 4 spaces required for proper indention on Bitbucket
var indentionAmount = (mode === 'bitbucket.org' ? ' ' : ' ');
var indentation = mode === 'bitbucket.org' ? ' ' : ' ';

var toc =
'**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*'
+ '\n\n'
+ linkedHeaders
.map(function (x) {
var indent = _(_.range(x.rank - lowestRank))
.reduce(function (acc, x) { return acc + indentionAmount; }, '');
.reduce(function (acc, x) { return acc + indentation; }, '');

return indent + '- ' + x.anchor;
})
Expand Down

0 comments on commit 10d09d5

Please sign in to comment.