Charcoal-SE / userscripts

Collection of userscripts that are used by/are useful to Charcoal.
https://charcoal-se.org/scripts
Apache License 2.0
28 stars 27 forks source link

FIRE has extra space on first line of code blocks #144

Closed tripleee closed 5 years ago

tripleee commented 5 years ago

It seems that code formatted with four spaces gets indented an extra space on the first line.

Sample screenshot from Chrome on MacOS Mojave, input is https://metasmoke.erwaysoftware.com/post/166877

Screen shot illustrating problem

I originally though this was because of the recent code formatting update in Stack Overflow's Markdown (and maybe it is) but this seems to affect the traditional code markup.

double-beep commented 5 years ago

This is actually how the code is in the SO post, where is the problem?

Undo1 commented 5 years ago

@double-beep Are you sure? I'm not seeing it on the actual post.

double-beep commented 5 years ago

@Undo1 you are right. I misunderstood the issue. Speaking of extra spaces in FIRE, I found:

image

where post is:

image

where that is a little bit strange. Spaces are added and I think it is related.

CalvT commented 5 years ago

Actually @double-beep is correct. See below - note the blue selected area where I have selected the spaces:

image

The spaces are in the original post, so not a FIRE problem.

Also present in metasmoke:

image

CalvT commented 5 years ago

The extra space is present on all code blocks, be it ````, ~~~, or the standard four spaces:

Examples - code with ~~~

image

Code indented with four spaces:

image

Reopening with a title change.

makyen commented 5 years ago

This is a CSS issue with an easy fix. I'll push an update. The problem is that the

.fire-popup .fire-popup-body code {
    padding: 1px 5px;
}

has strange effects when it's within a <pre>. That's easily solved.

makyen commented 5 years ago

Resolved/fixed with commit dd69464.