@@ -27,7 +27,7 @@ export function jsonToDocumentation(obj) {
2727 ` |${ field . comment ? field . comment : "" } |` ;
2828
2929 } ) . join ( "\n" ) ;
30- return `### ${ table . name } \n${ table . comment ? table . comment : "" } \n` +
30+ return `### ${ table . name } \n${ table . comment ? table . comment : "" } \n\n ` +
3131 `| Name | Type | Settings | References | Note |\n` +
3232 `|-------------|---------------|-------------------------------|-------------------------------|--------------------------------|\n` +
3333 `${ fields } \n\n` ;
@@ -44,16 +44,16 @@ export function jsonToDocumentation(obj) {
4444 . map ( ( r ) => {
4545 const startTable = obj . tables [ r . startTableId ] . name ;
4646 const endTable = obj . tables [ r . endTableId ] . name ;
47- return `- **${ startTable } to ${ endTable } **: ${ r . cardinality } ( ${ r . comment ? r . comment : "" } ) \n` ;
47+ return `- **${ startTable } to ${ endTable } **: ${ r . cardinality } ${ r . comment ? "(" + r . comment + ")" : "" } \n` ;
4848 } ) . join ( "" ) : "" ;
4949
5050 console . log ( obj . tables ) ;
5151 console . log ( obj . relationships ) ;
5252
53- return `# ${ obj . title } Database Documentation \n## Summary\n- [Introduction](#introduction)\n- [Database Type](#database-type)\n` +
53+ return `# ${ obj . title } documentation \n## Summary\n \n- [Introduction](#introduction)\n- [Database Type](#database-type)\n` +
5454 `- [Table Structure](#table-structure)\n${ documentationSummary } \n- [Relationships](#relationships)\n- [Database Diagram](#database-Diagram)\n\n` +
55- `## Introduction\n${ obj . notes } \n## Database type\n- **Database system:** ` +
55+ `## Introduction\n\n## Database type\n \n- **Database system:** ` +
5656 `${ obj . database . type } \n## Table structure\n\n${ documentationEntities } ` +
57- `\n\n## Relationships\n${ documentationRelationships } \n\n` +
58- `## Database Diagram\n\`\`\`${ jsonToMermaid ( obj ) } \`\`\`` ;
57+ `\n\n## Relationships\n\n ${ documentationRelationships } \n\n` +
58+ `## Database Diagram\n\n\ `\`\`${ jsonToMermaid ( obj ) } \`\`\`` ;
5959}
0 commit comments