Skip to content

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