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

Print list without space in front of * #57788

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SimonDanisch
Copy link
Contributor

I noticed, that round tripping markdown adds spaces in front of *:

marky = md"""
# Test

* test test
"""
string(marky)

Results in:

"# Test\n\n  * test test\n"

I guess there are no round tripping guarantees for this, but I think this is not what a markdown formatter would do? I'm not sure what plain wants to achieve here with the space, so I wanted to put this up for discussion via this PR!
Not really important in any way, but for my use case it would be nice to drop the space ;)

I noticed, that round tripping markdown adds spaces in front of `*`:
```julia
marky = md"""
# Test

* test test
"""
string(marky)
```
Results in:
```
"# Test\n\n  * test test\n"
```
I guess there are no round tripping guarantees for this, but I think this is not what a markdown formatter would do?
I'm not sure what `plain` wants to achieve here with the space, so I wanted to put this up for discussion via this PR! 
Not really important in general, but for my use case it would be nice to drop the space ;)
@Seelengrab
Copy link
Contributor

I think it's just to indent the list when looking at the .md source file. It could be made more consistent by only adding the space if the first character is a * and not a space.

@nsajko nsajko added display and printing Aesthetics and correctness of printed representations of objects. markdown labels Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. markdown
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants