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

Feature Request: Option to represent italic with single asterisks #117

Open
a2k-hanlon opened this issue Jan 4, 2023 · 2 comments
Open

Comments

@a2k-hanlon
Copy link

Thanks for developing this great extension and making it open source!

It would be convenient for the tool to to offer an option to have italic format represented in Markdown output as text enclosed in single asterisks (eg. italic text becomes *italic text*) instead of underscores (eg. italic text becomes _italic text_), which are used currently.

This "italic format" option would also represent text that is both bold and italicized using triple asterisks instead of nested double asterisks and single underscores (eg. really important text becomes ***really important text*** instead of really important text becoming **_really important text_**).

Use Case: I have a markdown application (wiki.js) configured to render underscore-enclosed text as underlined instead of italic. I know this underlining behaviour is not standard markdown, but single asterisks for italic is standard markdown, and it would be very helpful to have this option.

@a2k-hanlon
Copy link
Author

Another problem with using underscores for italic rather than asterisks is that underscores do not work for italicizing portions of words, whereas asterisks do. There's a note about this in The Markdown Guide: https://www.markdownguide.org/basic-syntax/#italic-best-practices

For example...

This works: "It's levi*o*sa not levio*sa*" > "It's leviosa not leviosa"

This doesn't work:"It's levi_o_sa not levio_sa_" > "It's levi_o_sa not levio_sa_"

This presents another use case for the suggested option. Also, it makes me consider whether the default should be asterisks (perhaps the more robust option) or underscores (the existing behaviour). I'll leave that up to the maintainer(s) to decide though!

@a2k-hanlon
Copy link
Author

This configurability could also potentially be extended to bold formatting (double underscores or double asterisks); however, just the change for italic format is suffice for the 2 use cases I shared above.

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

1 participant