Skip to content

Multiline prop description #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Noah2610
Copy link

@Noah2610 Noah2610 commented Mar 2, 2020

Multiline prop descriptions broke the generated markdown table.
This PR does the following:

  • when parsing doc comments, replace all newline characters "\n" in prop descriptions with "<br />"
  • handlebars template doesn't HTML-escape prop descriptions, to allow rendering of <br />;
    this also has the side-effect of rendering markdown from the doc comment, which I find positive

Noah2610 added 3 commits March 2, 2020 13:41
This function replaces all props' descriptions'
newline characters with `<br />`.

Reasoning: Multiline prop doc comments were breaking the
generated table cell for the description.

Replacing newlines with `<br />` tags should properly render
newlines in the generated markdown.

Handlebars has to not escape HTML though.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant