Skip to content

Commit

Permalink
Add links to answers.
Browse files Browse the repository at this point in the history
  • Loading branch information
jericson committed Aug 16, 2016
1 parent 0beeeb5 commit 0371f9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/how2.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ function magic(text, lang) {
var markdown = utils.toEscapedMarkdown(answers[index].body_markdown);

var title = titles[index];
console.log(colors.underline.green(title+'\n'));
console.log(colors.underline.green(title)
+' ('+colors.underline.blue(answers[index].link)+')\n');
console.log(markdown);

console.log('Press SPACE for more choices, any other key to quit.');
Expand Down
2 changes: 1 addition & 1 deletion lib/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function showAnswer(answer) {
mouse: true
});

answerBox.setContent(text);
answerBox.setContent(text + '\n(' + colors.underline.blue(answer.link) + ')');

answerBox.key(['escape', 'q'], function() {
screen.remove(answerBox);
Expand Down

0 comments on commit 0371f9a

Please sign in to comment.