samchon / prisma-markdown

Markdown generator of Prisma, including ERD and descriptions
MIT License
393 stars 18 forks source link

feat(suggestion): add 'separated' generation option #5

Closed SeiwonPark closed 10 months ago

SeiwonPark commented 10 months ago

Suggestion

Personally I've been writing markdowns by separating paragraphs with sections. And this actually improved the readability and so I think this could be a helpful option to users.


How it can be used

generator markdown {
    provider = "node ./lib/executable/markdown"
    title    = "Shopping Mall"
    separated = true // or "true" since config records are regarded as "string", defaults to false
}

Just by setting custom option separated to prisma generator, users can turn on/off this feature.


Result

Modified ERD.md

## Sections are separated by <br/> and each ### properties are separated by ---(horizontal line)

samchon commented 10 months ago

When <h1> or <h2> tags (#, ##) are used, markdown draws un underline below them.

By the way, if follow your suggestion, the <hr/> tagged separation lines are much thicker than <h1> and <h2>.

Is this really what you want? Looked at your markdown document, and it seems weird.

SeiwonPark commented 10 months ago

Thanks for the review! Oh I thought it's better like the "ROI(in image)" for spotting the exact section by separating.

Well but I get what you mean. The thickness might confuse <h1> and <h2> tags by the emphasized <hr> tag which might be less important than those two in structure. I'll close this PR. Thank you.