Python Forum
Help with BBCode - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html)
+--- Forum: Board (https://python-forum.io/forum-26.html)
+--- Thread: Help with BBCode (/thread-4517.html)



Help with BBCode - pyJim - Aug-22-2017

My apologies if this question isn't formatted correctly, but I'm trying to get BBCode straightened out. I'm trying to insert my code between the python tags but when I preview it, it is altered and hard to read. How do I insert it so it is easy for every one here to read? I've looked over the BBCode link but it wasn't helpful.  [color=#0000ff]When I copy/paste the code from pycharm it becomes this on the forum:


[color=#000080]def [/color]sieve(n=[color=#0000ff]1000000[/color]):
multiples = [color=#000080]set[/color]()
primes = [[color=#0000ff]2[/color]]
[color=#000080]for [/color]i [color=#000080]in [/color][color=#000080]range[/color]([color=#0000ff]3[/color], n, [color=#0000ff]2[/color]):
[color=#000080]if [/color]i [color=#000080]not in [/color]multiples:
[i][i]
Thank you...[/i][/i]



RE: Help with BBCode - Larz60+ - Aug-22-2017

When you post the code, use crtl-shift-v (on original copy)
this will remove any formatting.


RE: Help with BBCode - snippsat - Aug-22-2017

Ctrl+Shif+v is the advisable way as posed bye @Larz60+

There also a Remove Formatting button if you look on menu of editor.
If i just cope a line from your post.

Before:
When I copy/paste the code from pycharm it becomes this on the forum:

After mark line and push Remove Formatting button:
When I copy/paste the code from pycharm it becomes this on the forum: