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

Multi-paragraph dev comment formatting issue #439

Open
0xMohandes opened this issue Mar 29, 2023 · 2 comments
Open

Multi-paragraph dev comment formatting issue #439

0xMohandes opened this issue Mar 29, 2023 · 2 comments

Comments

@0xMohandes
Copy link

Single paragraph dev comments are shown as italic because of using _ before and after it.
_ does not work for multi-paragraph text properly, so instead it shows up as _
I encountered this, and I saw someone has raised this two months ago on stackexchange:
https://ethereum.stackexchange.com/questions/142917/how-to-get-solidity-docgen-to-properly-render-multi-paragraph-devs

An easy fix would be using <em> ... </em> instead of _ in themes/markdown/common.hbs
replacing _{{{natspec.dev}}}_ with <em>{{{natspec.dev}}}</em>
Can someone please action this if it makes sense?

@TSxo
Copy link

TSxo commented Sep 21, 2023

This is an ongoing issue for me too - this change would be welcome.

@frangio
Copy link
Contributor

frangio commented Sep 22, 2023

The suggestion doesn't really work because <em> elements are not permitted to have paragraphs inside them.

It's not really possible to do this generically with markdown. You can solve this in your project by copying common.hbs into a docgen-templates directory and adding docgen: { templates: 'docgen-templates' } in your Hardhat config, then customizing the part of the template that isn't working for you.

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

No branches or pull requests

3 participants