Closed roobie closed 4 years ago
The source text is this (retrieved from the textarea
):
Example usage
```
janet:1:> (def buf @"ABCDE")
@"ABCDE"
janet:2:> (buffer/slice 0)
error: bad slot #0, expected string|symbol|keyword|buffer, got 0
in buffer/slice
in _thunk [repl] (tailcall) on line 2, column 1
janet:3:> (buffer/slice buf 0)
@"ABCDE"
janet:4:> (buffer/slice buf 0 1)
@"A"
janet:5:> (buffer/slice buf 0 -1)
@"ABCDE"
janet:6:> (buffer/slice buf 1 3)
@"BC"
```
Oh interesting, I think it's a combination of moondown rendering the markdown and then and highlightjs highlighting it.
It seems to only happen when I try to use the three backticks, if I indent four spaces for code it doesn't happen. I'll have to see how I can get sundown to recognize three backticks instead of indentation
No nevermind it was way simpler than that, just my bad styling choices:
pre > code p {
line-height: 0; /* deleting this fixed it */
}
Of course the whole goal of that line was to stop it from having a crazy amount of padding, but maybe that's an actual markdown tweaking thing I should do
I can see that the issue is fixed. But yeah, I agree about the padding. I think the marked area in the image does not really correspond to the source text (that is, there's only one empty line between the "Example usage" and the code block.
But I'm closing this, as the issue is fixed.
I added a repl session to show some examples of
buffer/slice
, and it seems like the lines are rendered on a single row:I checked the html real quick, and the code is wrapped in a
pre
so I'm not sure why it looks like this.