fix raw editor formatting controls

This commit is contained in:
Shawn Erquhart 2017-06-23 14:53:35 -04:00
parent faec38ac19
commit 54e77bd80c

View File

@ -128,7 +128,7 @@ export default class RawEditor extends React.Component {
surroundSelection(chars) { surroundSelection(chars) {
const selection = this.getSelection(); const selection = this.getSelection();
const newSelection = Object.assign({}, selection); const newSelection = Object.assign({}, selection);
const { value } = this.props; const { value } = this.state;
const escapedChars = chars.replace(/\*/g, '\\*'); const escapedChars = chars.replace(/\*/g, '\\*');
const regexp = new RegExp(`^${ escapedChars }.*${ escapedChars }$`); const regexp = new RegExp(`^${ escapedChars }.*${ escapedChars }$`);
let changed = chars + selection.selected + chars; let changed = chars + selection.selected + chars;