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
remove // support, as it never worked
if you want to escape a /, do it with \/ or just precede with a space
This commit is contained in:
@@ -434,7 +434,7 @@ module.exports = {
|
|||||||
// trim any trailing whitespace, as it can confuse the parser for
|
// trim any trailing whitespace, as it can confuse the parser for
|
||||||
// IRC-style commands
|
// IRC-style commands
|
||||||
input = input.replace(/\s+$/, "");
|
input = input.replace(/\s+$/, "");
|
||||||
if (input[0] === "/" && input[1] !== "/") {
|
if (input[0] === "/") {
|
||||||
const bits = input.match(/^(\S+?)( +((.|\n)*))?$/);
|
const bits = input.match(/^(\S+?)( +((.|\n)*))?$/);
|
||||||
let cmd;
|
let cmd;
|
||||||
let args;
|
let args;
|
||||||
|
|||||||
@@ -731,7 +731,7 @@ export default class MessageComposerInput extends React.Component {
|
|||||||
const firstGrandChild = firstChild && firstChild.nodes.get(0);
|
const firstGrandChild = firstChild && firstChild.nodes.get(0);
|
||||||
if (firstChild && firstGrandChild &&
|
if (firstChild && firstGrandChild &&
|
||||||
firstChild.object === 'block' && firstGrandChild.object === 'text' &&
|
firstChild.object === 'block' && firstGrandChild.object === 'text' &&
|
||||||
firstGrandChild.text[0] === '/' && firstGrandChild.text[1] !== '/')
|
firstGrandChild.text[0] === '/')
|
||||||
{
|
{
|
||||||
commandText = this.plainWithIdPills.serialize(editorState);
|
commandText = this.plainWithIdPills.serialize(editorState);
|
||||||
cmd = SlashCommands.processInput(this.props.room.roomId, commandText);
|
cmd = SlashCommands.processInput(this.props.room.roomId, commandText);
|
||||||
|
|||||||
Reference in New Issue
Block a user