You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Outside of any code tags a forward slash will remove any indenting you have (tabs or spaces).
When inside a tag (not php) a forward slash will:
IF:
Indentation in the above line is only using the tab character:
Apply the same indentation of the above line to the current line.
ELSE IF:
Indentation in the above line has either spaces or both spaces and tabs:
Apply what seems to be a random indentation depending somewhat on the line above.
END.
When inside a php tag if the auto indent tab character is already there and a forward slash is typed, indentation on that line is removed.
When inside a php tag if YOU indent the code (either spaces or tab character or both) then type a forward slash the script crashes the page.
Google Chrome 10.0.648.133 (Official Build 77742) beta
WebKit 534.16 (branches/chromium/648@80788)
V8 3.0.12.30
User Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
I found two indentation-related bugs (06540e3 and 6dc5d31) that were in play here, which caused the hangs and the weird indentation. The reaction to the slash key is caused by the fact that that key is considered 'electric' by the xml mode, meaning it might change the indentation of the current line, so the line is reindented when you type a slash. To turn this off, set the electricChars option to false.
In the PHP demo here : http://codemirror.net/2/mode/php/ the following things happen around typing a forward slash:
IF:
Indentation in the above line is only using the tab character:
Apply the same indentation of the above line to the current line.
ELSE IF:
Indentation in the above line has either spaces or both spaces and tabs:
Apply what seems to be a random indentation depending somewhat on the line above.
END.
Google Chrome 10.0.648.133 (Official Build 77742) beta
WebKit 534.16 (branches/chromium/648@80788)
V8 3.0.12.30
User Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16
Cheers
Charlie
charlie@csent.org
The text was updated successfully, but these errors were encountered: