Python Forum
strange change of the indention to 3 spaces
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
strange change of the indention to 3 spaces
#11
def foo():
"""This is just some dummy code"""
  
    a=0
    for n in range(10):
        a+=n
    return a
def foo():
"""This is just some dummy code"""
  
    a=0
    for n in range(10):
        a+=n
    return a
def foo():
"""This is just some dummy code"""
  
    a=0
    for n in range(10):
        a+=n
    return a
Recommended Tutorials:
Reply
#12
i cant seem to replicate this at all. It remains 4 space indent after editing on numerous occasions.

Quote:However, it seems to only happen with the [ python ] codebox and not with the [ code ] codebox which I tend to use (not clicking the button rather typing the tag myself)

both python and code tags are linked to the same syntax highlighter code, so im not sure why one would do it and the other would not. Though i cant really test it as i cant replicate it.
Recommended Tutorials:
Reply
#13
Testing:

def foo():
"""This is just some dummy code"""
  
   a=0
   for n in range(10):
       a+=n
   return a
It did change to 3 spaces for me.
Reply
#14
(May-19-2017, 04:18 PM)metulburr Wrote: i cant seem to replicate this at all.
(May-19-2017, 06:06 PM)Larz60+ Wrote: It did change to 3 spaces for me.
Browser? OS?
Reply
#15
Testing something else

def foo():
"""This is just some dummy code"""
  
   a=0
   for n in range(10):
       a+=n
   return a
So, it doesn't happen with Edit, Only with Full Edit and Moderate. Also immediately after you click Full Edit and Moderate, the indentation is off - i.e. it's not after the Update. The preview of the post for edit is already broken
Reply
#16
def foo():
"""spam"""
    a=0
    for n in range(10):
        a+=n
    return a
*edit* Ok, so you have to actually save for the change to happen. If you just go into Full Edit, the indentation is off, but if you cancel the edit without saving, it's still 4 spaces.
Seems like the Full Editor might be whack.
Reply
#17
Quote:Browser? OS?
Mozilla firefox 53.0.2 windows 7 pro
used quick reply with typed code tags
as soon as I tried to edit, text was converted
sorry for brain fart
Reply
#18
(May-19-2017, 07:32 PM)nilamo Wrote: you have to actually save for the change to happen. If you just go into Full Edit, the indentation is off, but if you cancel the edit without saving, it's still 4 spaces.
yes, I should have mentioned that from the beginning
Reply
#19
Looking a little into it.
I guess no one can get 3-space indent if do as image under.
Also first click on Preview Post button,then paste in code into editor(now Post a New Reply window).
In editor clicking on Preview Post will change nothing.
[Image: Bo4iGN.jpg]
When in Quick Reply window an now paste code in that window.
Then hit Preview Post button it will be 3-space indent.
Reply
#20
The problem is from Quick Reply when clicking on Preview Post
It will always lose 1-indent
Eg.
1-indent(be 0-indent after click Preview Post)
4-indent(will be 3-indent after click Preview Post)
Reply


Forum Jump:

User Panel Messages

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