Skip to content
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

Multiline comments are trimmed too aggressively #85

Closed
ChristianKienle opened this issue Jul 5, 2019 · 6 comments
Closed

Multiline comments are trimmed too aggressively #85

ChristianKienle opened this issue Jul 5, 2019 · 6 comments
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt improvement

Comments

@ChristianKienle
Copy link
Contributor

ChristianKienle commented Jul 5, 2019

Issuehunt badges

Description
We are currently adopting vuese in our component library. So far it works pretty well – thank you for this wonderful project.

Some of our components are a bit more complex – for those components we have written guides using plain markdown (for example, our table component comes with such a guide) which explain step by step how this component works. In addition to those guide we also have API documentation generated by using @vuese/parser. Sometimes we also want to include short examples in the API documentation that show how to use the component. Just to avoid developers going back and forth between the guides and API documentation too much. The example below shows such an example:

<script>
// Use this component together wit `fd-table-fixed` and `fd-table` in order to create a table with a fixed column.
// Example:
// ```xml
// <fd-table-fixed-wrapper>
//   <fd-table-fixed>
//     <fd-table />
//   </fd-table-fixed>
// </fd-table-fixed-wrapper>
// ```
export default {
  name: "FdTableFixedWrapper"
};
</script>

Our own renderer uses the component description array produces by vuese/parser, joins it using \n and then feeds it into our markdown-component that also does syntax highlighting.

Unfortunately every line in the component description array is trimmed which means that the intention of our example code is gone making it hard to read.

Screenshot 2019-07-05 at 15 34 54

To Reproduce
Steps to reproduce the behavior:

  • copy the example above and
  • paste it into vuese explorer

Expected behavior
I expect that multiline comments are not trimmed from both sides.

Screenshots
See above

Which version do you use:
latest as of this moment

Additional information
I suggest either making the trimming lest aggressive (at least for multiline comments) or add the untrimmed comments as an additional property: "rawCommentDescription" or something like that. This way we could simply use that.


IssueHunt Summary

maykefreitas maykefreitas has been rewarded.

Backers (Total: $10.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jul 29, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Jul 29, 2019

@issuehunt has funded $10.00 to this issue.


@sudomf
Copy link
Contributor

sudomf commented Aug 2, 2019

hey @ChristianKienle. How are you? Hope that well.

I just create a PR that solves the problem :)

@ChristianKienle
Copy link
Contributor Author

@maykefreitas super cool. :D Can't wait for it to get merged. ❤️

@sudomf
Copy link
Contributor

sudomf commented Aug 2, 2019

@ChristianKienle hope that it help you :)

@HcySunYang
Copy link
Member

@ChristianKienle

 - @vuese/cli@2.6.0
 - @vuese/markdown-render@2.4.0
 - @vuese/parser@2.3.0

@issuehunt-oss
Copy link

issuehunt-oss bot commented Aug 3, 2019

@HcySunYang has rewarded $9.00 to @maykefreitas. See it on IssueHunt

  • 💰 Total deposit: $10.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $1.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt improvement
Projects
None yet
Development

No branches or pull requests

3 participants