Merge pull request #1192 from matrix-org/t3chguy/markdown_allow_u
Allow underline through MD and in RTE (MD) using <u> which works with CM
This commit is contained in:
commit
6404f7603c
3 changed files with 5 additions and 10 deletions
|
@ -420,7 +420,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
const modifyFn = {
|
||||
'bold': (text) => `**${text}**`,
|
||||
'italic': (text) => `*${text}*`,
|
||||
'underline': (text) => `_${text}_`, // there's actually no valid underline in Markdown, but *shrug*
|
||||
'underline': (text) => `<u>${text}</u>`,
|
||||
'strike': (text) => `<del>${text}</del>`,
|
||||
'code-block': (text) => `\`\`\`\n${text}\n\`\`\`\n`,
|
||||
'blockquote': (text) => text.split('\n').map((line) => `> ${line}\n`).join('') + '\n',
|
||||
|
@ -431,7 +431,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
const selectionAfterOffset = {
|
||||
'bold': -2,
|
||||
'italic': -1,
|
||||
'underline': -1,
|
||||
'underline': -4,
|
||||
'strike': -6,
|
||||
'code-block': -5,
|
||||
'blockquote': -2,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue