1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please strip trailing whitespace from codeblocks

Discussion in 'Main Forum' started by wim, Oct 8, 2018.

  1. wim

    wim Guest

    I've just posted this answer with a code block copy-pasted from my tty (zsh) and it turned out looking like this:

    >>> haystack = "qabcdzzzefgyyyh"
    >>> needle = "acgh"
    >>> all(x in iter(haystack) for x in needle)
    True


    Big horizontal scrollbar. I had to manually edit it to look like this:

    >>> haystack = "qabcdzzzefgyyyh"
    >>> needle = "acgh"
    >>> all(x in iter(haystack) for x in needle)
    True


    Could we strip trailing whitespace off lines automatically, when submitting a post?

    Login To add answer/comment
     

Share This Page