Skip to content

Commit

Permalink
define path in helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Sep 8, 2017
1 parent 8843445 commit 1d2d9a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .verb.md
Expand Up @@ -495,7 +495,7 @@ npm i -d && npm run benchmark
As of {%= date() %} (longer bars are better):

```sh
{%= bench() %}
{%= bench("benchmark/last.md") %}
```

[regular-language]: https://en.wikipedia.org/wiki/Regular_language
Expand Down
3 changes: 1 addition & 2 deletions benchmark/helper.js
Expand Up @@ -4,8 +4,7 @@ var fs = require('fs');
var path = require('path');
var repeat = require('repeat-string');

function bench() {
var filepath = path.join(__dirname, 'last.md');
function bench(filepath) {
var str = fs.readFileSync(filepath, 'utf8');
var sections = str.split(/(?=\n?(?:# benchmark))/);
sections.shift();
Expand Down

0 comments on commit 1d2d9a0

Please sign in to comment.