1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

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

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) {