WPIntell

Source evidence

Indentation not working

Embed GitHub Gist · support · 2013-01-29T18:01:00+00:00

complaintsentiment
mediumseverity
0.86relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 21 rows with source links

9.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

19 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
bennuttall unresolved
If I embed a gist using the github gist embed code, the indentation is shown as expected. Using this plugin, it embeds gists lose their indentation. http://wordpress.org/extend/plugins/embed-github-gist/ Apologies – I can confirm this is a CSS rule causing this bug on my site. Will try to narrow it down and post a fix if anyone has the same issue maybe it will help. /withdrawn It has something to do with pre { white-space: pre-wrap; } The problem is that if the gist loads with the css like above then it shows the indent and then you could change to… pre { white-space: nowrap; } …but if you have the nowrap before the gist loads you have the code not wrapping but no indention. I am not sure where the problem lies. I’ve run into this same issue. I tried changing the CSS pre tag definition to no avail. Were you able to find the CSS issue? I commented a few lines out of my theme’s stylesheet as follows: pre { padding: 10px; /*white-space: pre; white-space: pre-wrap; white-space: pre-line;*/ word-wrap: break-word; } Got one similar issue though – the line number margin varies in width according to the content of the code. Any ideas? See: http://bennuttall.com/comprehension-in-python/ I came across this today. I have not been able to test it yet. http://davidwalsh.name/tab-size

Comments

5 shown
bennuttall 2013-01-29T23:05:00+00:00

Apologies – I can confirm this is a CSS rule causing this bug on my site. Will try to narrow it down and post a fix if anyone has the same issue maybe it will help. /withdrawn

Ulrich 2013-02-09T21:06:00+00:00

It has something to do with pre { white-space: pre-wrap; } The problem is that if the gist loads with the css like above then it shows the indent and then you could change to… pre { white-space: nowrap; } …but if you have the nowrap before the gist loads you have the code not wrapping but no indention. I am not sure where the problem lies.

vigilantetheory 2013-02-11T05:36:00+00:00

I’ve run into this same issue. I tried changing the CSS pre tag definition to no avail. Were you able to find the CSS issue?

bennuttall 2013-02-11T11:15:00+00:00

I commented a few lines out of my theme’s stylesheet as follows: pre { padding: 10px; /*white-space: pre; white-space: pre-wrap; white-space: pre-line;*/ word-wrap: break-word; } Got one similar issue though – the line number margin varies in width according to the content of the code. Any ideas? See: http://bennuttall.com/comprehension-in-python/

Ulrich 2013-03-20T19:28:00+00:00

I came across this today. I have not been able to test it yet. http://davidwalsh.name/tab-size