1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-06 02:26:04 +02:00
Files
misskey/src/common/text/elements/bold.js
2017-02-11 02:32:00 +09:00

15 lines
229 B
JavaScript

/**
* 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)
};
};