Skip to content

Commit

Permalink
Ensure we're not breaking code blocks M->S
Browse files Browse the repository at this point in the history
  • Loading branch information
tadzik committed Apr 4, 2024
1 parent 1921b50 commit 6db082f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit/substitutionsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,5 +322,10 @@ describe("Substitutions", () => {
message = substitutions.stripMatrixReplyFallback(message);
expect(message.content.body).to.equal("foo\nbar");
});
it("should not break code block contents", () => {
let message = { content: { body: "```\nfoo\n```" } };
message = substitutions.stripMatrixReplyFallback(message);
expect(message.content.body).to.equal("```\nfoo\n```");
});
});
});

0 comments on commit 6db082f

Please sign in to comment.