Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2018-07-11 10:29:14 +01:00
parent fd4f9679df
commit c3aef6e3a0
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E

View file

@ -182,6 +182,11 @@ export default class MessageComposerInput extends React.Component {
return `<u>${ children }</u>`;
case 'deleted':
return `<del>${ children }</del>`;
case 'code':
// XXX: we only ever get given `code` regardless of whether it was inline or block
// XXX: workaround for https://github.com/tommoor/slate-md-serializer/issues/14
// strip single backslashes from children, as they would have been escaped here
return `\`${ children.split('\\').map((v) => v ? v : '\\').join('') }\``;
}
},
},