Archived
0

MCSM: преобразование AnsiColor->HTML

This commit is contained in:
2017-05-18 16:09:37 +03:00
parent 37b8f02b69
commit c208c9f015
4 changed files with 342 additions and 2 deletions

View File

@@ -94,9 +94,11 @@ var WebConsole = React.createClass({
lines: []
}},
render: function(){
var ansi_up = new AnsiUp;
return(
ce('div', {id: 'webconsole'},
this.state.lines.map(function(line){ return ce('p', null, line); }))
this.state.lines.map(function(line){ return ce('p', {dangerouslySetInnerHTML: {__html: ansi_up.ansi_to_html(line)}}); }))
)
},
componentWillUnmount: function(){