mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Merge branch 'sidv/linkDocsSource' of https://github.com/mermaid-js/mermaid into sidv/linkDocsSource
* 'sidv/linkDocsSource' of https://github.com/mermaid-js/mermaid: Update packages/mermaid/src/docs.mts
This commit is contained in:
commit
30a3a9ee53
@ -71,7 +71,9 @@ const prettierConfig: prettier.Config = {
|
||||
let filesWereTransformed = false;
|
||||
|
||||
const generateHeader = (file: string): string => {
|
||||
return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](../${file}).`;
|
||||
// path from file in docs/* to repo root, e.g ../ or ../../ */
|
||||
const rootDirectory = relative(file, "packages/mermaid/src/docs");
|
||||
return `# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT. Please edit the source file in [${file}](${join(rootDirectory, file)}).`;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user