Python Forum
Syntax Highlighter Codebox Issues
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntax Highlighter Codebox Issues
#11
Quote:No problem for me when i copy direct from PyCharm.
I donwloaded pycharm to test this and i get the same thing too
Pasted straight out as text:
class Klass:
   pass


and in the code box
[color=#000080][b]class [/b][/color]Klass:

    [color=#000080][b]pass[/b][/color]




It modifies the text from thereafter within MyBB editor
Recommended Tutorials:
Reply
#12
Some code in PyCharm preserve tag from net.
There is a Copy as plain text that fix this out of PyCharm.
Reply
#13
This i wrote out within pycharm, but the latter fixes anyways. 

Oh i see

@[sparkz_alot]

class Klass:

    pass
Recommended Tutorials:
Reply
#14
Ok, this is copied as 'plain text' in pycharm

while True:
    number = int(input("enter a number between 1 and 10: "))    # Get a number
    if 0 <= number <= 10:
        print("number = ", number)
        # Go back and get another number
    else:
        print("out of range")
        break    # Break out of 'while' loop and continue with next command

print("Done")
which works like a charm or should i say like a pycharm  :D
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#15
Whenever we stop changing stuff, and keep things more static, ill start making more help documents....including adding a tip for pycharm users :) for the python code tags
Recommended Tutorials:
Reply
#16
Atom
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
PyCharm
[color=#000000][size=x-small][font=DejaVu Sans Mono][color=#000080][b]import [/b][/color]curses
stdscr = curses.initscr()
[color=#000080][b]from [/b][/color]curses [color=#000080][b]import [/b][/color]wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = [color=#0000ff]20[/color]; begin_y = [color=#0000ff]7
[/color]height = [color=#0000ff]5[/color]; width = [color=#0000ff]40
[/color]win = curses.newwin(height, width, begin_y, begin_x)[/font][/size][/color]
PyCharm has "Copy as Plain Text" in the selection context menu

Sublime Text 3
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
Ninja IDE
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
Geany
import curses
stdscr = curses.initscr()
from curses import wrapper

curses.noecho()
curses.cbreak()
stdscr.keypad(True)

begin_x = 20; begin_y = 7
height = 5; width = 40
win = curses.newwin(height, width, begin_y, begin_x)
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#17
I think we should enable the default codebox. This (until i figure out how to split them) also comes with the php codebox button as well. There are a few issues with the syntax highlighted codebox. And this allows a good back up. 

The syntax codebox is cool. But a lot of people are getting frustrated with it. Sometimes its better to just get the information across than to have it fancy'd up. If we ever get all the bugs worked out we can always switch the code tags to the python html again.

I think we should use it if having no problems, but if something happens (such as unexpected input), then one would just use the codebox. 

Anyways i didnt want to just switch it without wondering if people are thinking the same thing or not  :naughty:
Recommended Tutorials:
Reply
#18
Maybe wait and see how it goes,i think it work pretty well now.
I have look over most of code on site and it looks okay.
Some post have i correct,if there where some errors.

The features/problem(with MyBB) that tag is preserved when copy from web,
is the same in old code box.
Reply
#19
I often copy code from the web. Im getting to the point would rather put it outside the codebox because then i dont have to fuss with it at all. 

And then there are a lot of small minor things that drive me insane.
Recommended Tutorials:
Reply
#20
Here is another issue
If you look at this post
http://python-forum.io/Thread-Tkinter-se...34#pid1534

func_to_run is actually spaced out with underscores. But you cant see that. It only shows spaces and hides the underscores. If you copy it you get the underscores. But it doesnt show that as it.
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  codebox usage help doc metulburr 0 1,657 Oct-31-2020, 12:12 PM
Last Post: metulburr
  single/double quote escapes codebox highlighter metulburr 3 3,513 Aug-08-2017, 01:36 PM
Last Post: metulburr
  codebox borders metulburr 15 15,865 Nov-24-2016, 04:04 AM
Last Post: snippsat
  URL not showing properly in comments of codebox Larz60+ 4 5,523 Nov-05-2016, 04:23 PM
Last Post: Larz60+
  More codebox issues Mekire 26 19,617 Oct-13-2016, 05:20 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020