File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
- const React = require ( 'react' ) ;
1
+ 'use strict' ;
2
2
3
- const ansiToJSON = require ( 'ansi-to-json' ) ;
3
+ var React = require ( 'react' ) ;
4
+
5
+ var ansiToJSON = require ( 'ansi-to-json' ) ;
4
6
5
7
function ansiJSONtoStyleBundle ( ansiBundle ) {
6
- const style = { } ;
8
+ var style = { } ;
7
9
if ( ansiBundle . bg ) {
8
- style . backgroundColor = ` rgb(${ ansiBundle . bg } )` ;
10
+ style . backgroundColor = ' rgb(' + ansiBundle . bg + ')' ;
9
11
}
10
12
if ( ansiBundle . fg ) {
11
- style . color = ` rgb(${ ansiBundle . fg } )` ;
13
+ style . color = ' rgb(' + ansiBundle . fg + ')' ;
12
14
}
13
15
return {
14
16
content : ansiBundle . content ,
15
- style,
17
+ style : style
16
18
} ;
17
19
}
18
20
@@ -23,7 +25,7 @@ function ansiToInlineStyle(text) {
23
25
function inlineBundleToReact ( bundle , key ) {
24
26
return React . createElement ( 'span' , {
25
27
style : bundle . style ,
26
- key,
28
+ key : key
27
29
} , bundle . content ) ;
28
30
}
29
31
@@ -35,7 +37,7 @@ function Ansi(props) {
35
37
}
36
38
37
39
Ansi . propTypes = {
38
- children : React . PropTypes . string ,
40
+ children : React . PropTypes . string
39
41
} ;
40
42
41
43
module . exports = Ansi ;
You can’t perform that action at this time.
0 commit comments