The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/markdown/lib/parser/original/original.js

19 lines
439 B

/*
* Markdown is a named function that will parse markdown syntax
* @param {Object} message - The message object
*/
import { markdown } from './markdown.js';
import { code } from './code.js';
export const original = (message) => {
// Parse markdown code
message = code(message);
// Parse markdown
message = markdown(message);
// Replace linebreak to br
message.html = message.html.replace(/\n/gm, '<br>');
return message;
};