Python Forum
Empty list literal display error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Empty list literal display error
#1
There seems to be an issue with the literal for an empty list in python tags.

The following in tags should read ">>> open_bracket close_bracket"
but both inline and python tags remove the brackets.
>>>
>>> 
Edit: Okay so it seems the editor itself is eating them. If I type them and post they appear. If I go preview they dissappear from the editing area. If I try to edit a post with them they also disappear.
Reply
#2
Known problem. It was the cost of fixing some other editor problem.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
So are we trying to fix it or just accepting it as broken?
Reply
#4
I think we're accepting it as broken, and watching out for it.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#5
You can look at this page for the discussion.
Quote:Unfortunately this editor does not support empty tag.
you can check in http://sdk.ckeditor.com/samples/bbcode.html that same issue will happen.
So we have not put more effort into fixing it,as our new Rin Editor is based on Ckeditor.
It's a problem that rarely comes up,and when it do we know what it is.
If you want look into the regex for it you are welcome do it,as long as it don't break anything else Wink
Reply
#6
I guess its the lesser of two evils. Its the new Rin Editor's (based on Ckeditor) fault. The default MyBB editor was removing whitespaces if previewing before posting. The Ckeditor or any descendants apparently remove empty [] lists.

I contacted the Rin Editor author and he said its Ckeditor issue and that i would have to contact them. Personally i think by the time they fix that and implement it into their release, MyBB 2.0 might be out.

I looked into the CKeditor and the whole thing is just javascript with no whitespace in their pages. Almost unreadable. I made a github issue on there page. But i dont expect anything from it. We could try some things if someone wants to tweak it.
Recommended Tutorials:
Reply
#7
It works as long as you don't ever preview the post or edit the post (write only):
spam = []
Another option is to... not have an empty list (space between brackets):
foo = [ ]
Short of changing editors, I think our only solution is to wait for an upstream patch (...or fix it ourselves, and submit a patch).
Reply
#8
Quote:Short of changing editors, I think our only solution is to wait for an upstream patch (...or fix it ourselves, and submit a patch).
I think when mybb 2.0 comes out we will be switching. A lot of the plugins and core edits we use will be implemented into the MyBB Core. I have made them aware of their default MyBB editor issue of removing spaces (Which is why we switched editors in the first place).
Recommended Tutorials:
Reply


Forum Jump:

User Panel Messages

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