You've already forked matrix-react-sdk
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:
@@ -487,8 +487,8 @@ export default class MessageComposerInput extends React.Component {
|
|||||||
'strike': (text) => `~~${text}~~`,
|
'strike': (text) => `~~${text}~~`,
|
||||||
'code-block': (text) => `\`\`\`\n${text}\n\`\`\``,
|
'code-block': (text) => `\`\`\`\n${text}\n\`\`\``,
|
||||||
'blockquote': (text) => text.split('\n').map((line) => `> ${line}\n`).join(''),
|
'blockquote': (text) => text.split('\n').map((line) => `> ${line}\n`).join(''),
|
||||||
'unordered-list-item': (text) => text.split('\n').map((line) => `- ${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) => `${i + 1}. ${line}\n`).join(''),
|
'ordered-list-item': (text) => text.split('\n').map((line, i) => `\n${i + 1}. ${line}`).join(''),
|
||||||
}[command];
|
}[command];
|
||||||
|
|
||||||
if (modifyFn) {
|
if (modifyFn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user