mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: create new AnsiUp instance for every render
This commit is contained in:
1 parent
86d2a36731
commit
e137e1940f
2 files changed
+2
-6
No files matched your search
@@ -7,8 +7,6 @@ import { i18n } from 'vj/utils';
|
||||
import DataInput from './DataInputComponent';
|
||||
import Panel from './PanelComponent';
|
||||
|
||||
const AU = new AnsiUp();
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
input: state.pretest.input,
|
||||
output: state.pretest.output,
|
||||
@@ -47,7 +45,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(class ScratchpadPret
|
||||
/>
|
||||
<DataInput
|
||||
title={i18n('Output')}
|
||||
value={AU.ansi_to_html(this.props.output)}
|
||||
value={new AnsiUp().ansi_to_html(this.props.output)}
|
||||
html
|
||||
/>
|
||||
</Allotment>
|
||||
|
||||
Reference in new issue
Block a user