mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-17 15:29:25 +02:00
Apply suggestions from code review
Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
@@ -56,9 +56,7 @@ const handler = (e) => {
|
|||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
await generateLangium();
|
await generateLangium();
|
||||||
await mkdir('stats').catch(() => {
|
await mkdir('stats', {recursive: true});
|
||||||
// Ignore error if directory already exists
|
|
||||||
});
|
|
||||||
const packageNames = Object.keys(packageOptions) as (keyof typeof packageOptions)[];
|
const packageNames = Object.keys(packageOptions) as (keyof typeof packageOptions)[];
|
||||||
// it should build `parser` before `mermaid` because it's a dependency
|
// it should build `parser` before `mermaid` because it's a dependency
|
||||||
for (const pkg of packageNames) {
|
for (const pkg of packageNames) {
|
||||||
|
@@ -229,7 +229,7 @@ export const setWrap = function (wrapSetting?: boolean) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const extractWrap = (text?: string): { cleanedText?: string; wrap?: boolean } => {
|
const extractWrap = (text?: string): { cleanedText?: string; wrap?: boolean } => {
|
||||||
if (!text) {
|
if (text === undefined) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
text = text.trim();
|
text = text.trim();
|
||||||
|
Reference in New Issue
Block a user