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

Fix default template missing newlines before links if doc ends with html #309

Merged
merged 3 commits into from
Jul 6, 2023
Merged

Fix default template missing newlines before links if doc ends with html #309

merged 3 commits into from
Jul 6, 2023

Conversation

LuckyTurtleDev
Copy link
Contributor

The default template does not show links, if rust docs ends with html code.

This happen because there is now newline between doc and links, which cause some markdown renders like GitHub, to not interpret markdown.

Example generated README.md:

...
<div align="center">
		<img src="https://github.com/LuckyTurtleDev/mission2teegarden-b/assets/44570204/68403ebd-ce64-4baa-bba2-b52962b89d5c" width=80%>
 </div>
 [__cargo_doc2readme_dependencies_info]: ggGkYW0BYXSEGxZ8633wCs_9GzKKlc-jeF26G4eLyZuq8IdiG7yPhHI4iD8_YXKEGxvALrpccUwnG3LtwJOv_IT2G96ptTVep6W9G7qKrdEKLREhYWSBgndtaXNzaW9uMnRlZWdhcmRlbl9iX21hcGUwLjEuMA
...

msrd0
msrd0 previously approved these changes Jul 6, 2023
Copy link
Owner

@msrd0 msrd0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. No idea why that newline was missing.

@msrd0
Copy link
Owner

msrd0 commented Jul 6, 2023

Can you fix the tests please?

@LuckyTurtleDev
Copy link
Contributor Author

should this be a breaking change? Since cargo doc2readme --test will fail now at existing projects.

@msrd0
Copy link
Owner

msrd0 commented Jul 6, 2023

Hm ... good question. For those that include the __cargo_doc2readme_dependencies_info pseudo-link, this change is not breaking. For readmes without links, this change is also not breaking. For those readmes that explicitly filter out that line it is breaking ... but I think I don't really care.

@msrd0 msrd0 merged commit 708e070 into msrd0:main Jul 6, 2023
4 checks passed
@msrd0 msrd0 changed the title default template does not show link, if doc ends with html Fix default template missing newlines before links if doc ends with html Jul 6, 2023
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.

2 participants