thinkspace icon indicating copy to clipboard operation
thinkspace copied to clipboard

Code highlighting with linenos parameter is not displayed correctly

Open aleixsanchis opened this issue 4 years ago • 2 comments

Hi, I love your theme but I'm having trouble with an issue (I described it here https://stackoverflow.com/questions/60959717/lilenos-parameter-on-jekyll-highlight-tag-makes-the-code-disappear-and-only-re).

Basically, using the linenos parameters in a highlight block breaks and the code is not displayed.

Thanks a lot

aleixsanchis avatar Apr 08 '20 22:04 aleixsanchis

Hi, I managed to more or less get a working version, in case someone is encountering the same error and if the author doesn't answer:

in assets/scss/_syntax-highlighting.scss:

The line 31:

* {
        white-space: nonwrap;
}

Becomes

* {
        white-space: pre;
}

And on file assets/scss/base/_table.scss

The line 5:

 table-layout: fixed;

becomes

 table-layout: auto;

The result is still not quite there because some borders need deleting but at least the result is not broken

I could do a pull request but html/css is far from my expertise and I don't know if these changes break something else related to tables

aleixsanchis avatar Apr 09 '20 18:04 aleixsanchis

Just wanted to say thanks! Using

* {
        white-space: pre;
}

fixed my separate issue that the syntax highlighting was messing up the white space in JSON and python modes!

lcorcodilos avatar Jan 05 '22 02:01 lcorcodilos