mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
Resolves #488 -- make https-y things links in the console
This commit is contained in:
parent
85ae115fc2
commit
c801f9ed46
2 changed files with 21 additions and 9 deletions
|
@ -100,14 +100,26 @@ var CommandView = React.createClass({
|
|||
var paragraphs = this.state.result.split("\n");
|
||||
var result = [];
|
||||
for (var i = 0; i < paragraphs.length; i++) {
|
||||
result.push(
|
||||
<p
|
||||
key={'paragraph_' + i}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: paragraphs[i]
|
||||
}}
|
||||
/>
|
||||
);
|
||||
if (paragraphs[i].startsWith('https://')) {
|
||||
result.push(
|
||||
<a
|
||||
href={paragraphs[i]}
|
||||
key={'paragraph_' + i}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: paragraphs[i]
|
||||
}}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
result.push(
|
||||
<p
|
||||
key={'paragraph_' + i}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: paragraphs[i]
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
return (
|
||||
<div className={'commandLineResult'}>
|
||||
|
|
|
@ -228,7 +228,7 @@ var Sandbox = Backbone.View.extend({
|
|||
var url =
|
||||
'https://learngitbranching.js.org/?NODEMO&command=importTreeNow%20' + escape(treeJSON);
|
||||
command.setResult(
|
||||
intl.todo('Here is a link to the current state of the tree: ') + url
|
||||
intl.todo('Here is a link to the current state of the tree: ') + '\n' + url
|
||||
);
|
||||
command.finishWith(deferred);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue