mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 07:33:10 +02:00
45e8331e26
Closes #12, #227 and #58
14 lines
229 B
TypeScript
14 lines
229 B
TypeScript
/**
|
|
* Bold
|
|
*/
|
|
|
|
module.exports = text => {
|
|
const match = text.match(/^\*\*(.+?)\*\*/);
|
|
if (!match) return null;
|
|
const bold = match[0];
|
|
return {
|
|
type: 'bold',
|
|
content: bold,
|
|
bold: bold.substr(2, bold.length - 4)
|
|
};
|
|
};
|