Skip to content

Commit c91307f

Browse files
vladimyragnivade
authored andcommitted
Fix printing of random page in markdown format 🐛
1 parent e10e7fc commit c91307f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/tldr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if (program.list) {
8888
} else if (program.listAll) {
8989
tldr.listAll(program.singleColumn);
9090
} else if (program.random) {
91-
tldr.random();
91+
tldr.random(program);
9292
} else if (program.randomExample) {
9393
tldr.randomExample();
9494
} else if (program.clearCache) {

lib/tldr.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ exports.get = (commands, options) => {
3232
printBestPage(commands.join('-'), options);
3333
};
3434

35-
exports.random = () => {
35+
exports.random = (options) => {
3636
let os = platform.getPreferredPlatformFolder();
3737
index.commandsFor(os)
3838
.then((pages) => {
@@ -42,7 +42,7 @@ exports.random = () => {
4242
}
4343
let page = sample(pages);
4444
console.log('PAGE', page);
45-
printBestPage(page);
45+
printBestPage(page, options);
4646
})
4747
.catch((err) => {
4848
console.error(err);

0 commit comments

Comments
 (0)