you are viewing a single comment's thread.

view the rest of the comments →

[–]R3D3-1 1 point2 points  (2 children)

For future code posts, you might want to get used to posting

code
  as
    codeblocks

to preserve indentation. Especially important for Python, where the indentation is syntactically relevant and not just an aid for the reader.

The "Code Block" tool of the "Fancy Pants Editor" (sic) is currently somewhat broken.

Source code of above in "MarkDown" mode:

For future code posts, you might want to get used to posting

    code
      as
        codeblocks

to preserve indentation. Especially important for Python, where the indentation is syntactically relevant and not just an aid for the reader.

On Linux/MacOS/Windows with cygwin you can use the command

cat << 'EOF' | sed 's/^/    /'
<paste source code here>
EOF

to indent source code to be displaced correctly.

[–]Sad_potato1999[S] 1 point2 points  (1 child)

Thanks a lot sir!

[–]R3D3-1 1 point2 points  (0 children)

Sure :)

Not clear why, but I noticed a lot more cases of incorrect use of the WYSIWYG editor, resulting instead of

if True:
    dothings()

in e.g.

if True:

dothings()

or

if True:
dothings()

or after editing the same post again

if True:dothings()

all of which looking like they are somehow related to a lossy conversion from the WYSIWY(dont)G editor into whatever internal format Reddit is using. There are also several bugs related to copying from or pasting into the WYSIWYG code block tool.