mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-14 12:59:46 +02:00
chore: Use ??
instead of ||
This commit is contained in:
@@ -181,10 +181,10 @@ export const transformToBlockQuote = (
|
||||
) => {
|
||||
if (vitepress) {
|
||||
const vitepressType = type === 'note' ? 'info' : type;
|
||||
return `::: ${vitepressType} ${customTitle || ''}\n${content}\n:::`;
|
||||
return `::: ${vitepressType} ${customTitle ?? ''}\n${content}\n:::`;
|
||||
} else {
|
||||
const icon = blockIcons[type] || '';
|
||||
const title = `${icon}${customTitle || capitalize(type)}`;
|
||||
const icon = blockIcons[type] ?? '';
|
||||
const title = `${icon}${customTitle ?? capitalize(type)}`;
|
||||
return `> **${title}** \n> ${content.replace(/\n/g, '\n> ')}`;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user