Skip to content

Commit 83df93a

Browse files
authored
Print list without space in front of *
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 ;)
1 parent 04922e7 commit 83df93a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/Markdown/src/render/plain.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ end
3535

3636
function plain(io::IO, list::List)
3737
for (i, item) in enumerate(list.items)
38-
print(io, isordered(list) ? "$(i + list.ordered - 1). " : " * ")
38+
print(io, isordered(list) ? "$(i + list.ordered - 1). " : "* ")
3939
lines = split(rstrip(sprint(plain, item)), "\n")
4040
for (n, line) in enumerate(lines)
4141
print(io, (n == 1 || isempty(line)) ? "" : " ", line)

0 commit comments

Comments
 (0)