Code Monkey home page Code Monkey logo

Comments (9)

Mottie avatar Mottie commented on May 25, 2024 1

Ok, so it looks like GitHub is adding an extra <br> inside the code block. I just hid it and it looks good now. Hopefully that doesn't mess up anything else.

from github-userscripts.

Mottie avatar Mottie commented on May 25, 2024

Hi @animatedantmo!

It looks like a code wrap style or script is being applied. When the code wraps, the new line will start at the beginning of the line. If not, then maybe it is this userscript's fault because it's adding content to make the whitespace visible.

When I have the code wrap toggle script running, I'm seeing the same thing; but my question is what are you expecting to happen when the code wraps?

from github-userscripts.

animatedantmo avatar animatedantmo commented on May 25, 2024

Excellent point @Mottie, I thought the same thing concerning the text wrapping. But then I saw the behavior on lines without any.

Notice line 107 displaying the behavior in the screenshot below

screen shot 2018-12-20 at 9 12 49 pm

But within the IDE it is fine and there is no wrapping

screen shot 2018-12-20 at 9 17 15 pm

Is this still the expected behavior?

from github-userscripts.

Mottie avatar Mottie commented on May 25, 2024

Hmm, I'm not sure because you're seeing something different from me.

Previously... on the diff views, GitHub would add an extra space (or two?) to every line to allow space for the + and - in the diff. Now, they add the indicator to a pseudo element and include a margin so people can copy/paste the code without the indicators.

I'm no longer seeing a leading space, or a space next to the + like in your screenshot.

GitHub also sets their tab indent to be 8 spaces. You'll see that change to 2 spaces because of my GitHub Dark setting.

from github-userscripts.

animatedantmo avatar animatedantmo commented on May 25, 2024

Ive added a different white space rendering script to debug a bit and that leading whitespace is still there. But without the odd wrapping if that helps

https://github.com/glebm/render-whitespace-on-github

screen shot 2018-12-20 at 11 45 59 pm

from github-userscripts.

Mottie avatar Mottie commented on May 25, 2024

Is this still an issue?

from github-userscripts.

animatedantmo avatar animatedantmo commented on May 25, 2024

Yes, looks like this is still happening with version 1.2.6

This is what the "GitHub Code Show Whitespace" script displays

odd

This is what the "Render Whitespace on GitHub" script displays

ok

Notice the odd display/line breaking happening on 103 and 107. The second display is what I would expect.

from github-userscripts.

Mottie avatar Mottie commented on May 25, 2024

Please share a link to the page where you see this issue. For me, the carriage returns in the JS files in this repo are not adding an extra CR that I see in the screenshots.

from github-userscripts.

animatedantmo avatar animatedantmo commented on May 25, 2024

The repo is private but I went ahead and setup a shell angular project with a PR that exhibits the issue. Please take a look at

https://github.com/animatedantmo/test/pull/1/files

from github-userscripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.