rte: change list behaviour in markdown mode

This commit is contained in:
Aviral Dasgupta 2017-03-07 04:15:28 +05:30
parent 9946cadc2d
commit f5b52fb488
No known key found for this signature in database
GPG key ID: 5FD1E9F4FFD3DA80

View file

@ -487,8 +487,8 @@ export default class MessageComposerInput extends React.Component {
'strike': (text) => `~~${text}~~`,
'code-block': (text) => `\`\`\`\n${text}\n\`\`\``,
'blockquote': (text) => text.split('\n').map((line) => `> ${line}\n`).join(''),
'unordered-list-item': (text) => text.split('\n').map((line) => `- ${line}\n`).join(''),
'ordered-list-item': (text) => text.split('\n').map((line, i) => `${i + 1}. ${line}\n`).join(''),
'unordered-list-item': (text) => text.split('\n').map((line) => `\n- ${line}`).join(''),
'ordered-list-item': (text) => text.split('\n').map((line, i) => `\n${i + 1}. ${line}`).join(''),
}[command];
if (modifyFn) {