Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.pyx Comment and syntax color error in editor #1723

Closed
spyder-bot opened this issue Feb 17, 2015 · 6 comments
Closed

.pyx Comment and syntax color error in editor #1723

spyder-bot opened this issue Feb 17, 2015 · 6 comments

Comments

@spyder-bot
Copy link
Collaborator

From ndie1...@gmail.com on 2014-02-06T10:54:22Z

Spyder Version: 2.3.0beta3
Python Version: 3.3.2
Qt Version : 4.8.4, PyQt4 (API v2) 4.9.6 on Windows
pyflakes >=0.6.0: 0.7.3 (OK)
pep8 >=0.6 : 1.4.6 (OK)
IPython >=0.13 : 0.13.2 (OK)
sphinx >=0.6.6 : 1.1.3 (OK)
rope >=0.9.2 : None (NOK)
matplotlib >=1.0: 1.2.1 (OK)
sympy >=0.7.0 : 0.7.2 (OK)
pylint >=0.25 : None (NOK)

What steps will reproduce the problem?

1.Loading a .pyx in the editor What is the expected output? What do you see instead? After upgrading from 2.3.0 dev3 to 2.3.0 beta3, when working in .pyx files in editor, syntax for comments is wrong. Additionally, hitting "toggle comment" places a "c" instead of a "#" at the start of the line. However, Cython still functions perfectly fine.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1723

@spyder-bot
Copy link
Collaborator Author

From ndie1...@gmail.com on 2014-02-06T10:01:12Z

I have reverted back to spyder 2.3.0 beta2 and the problem is resolved. Something happened between beta2 and beta3 that removed syntax support for .pyx files

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-02-07T05:05:36Z

Steven, do you know what could be happening here? Maybe a problem with your method "is_python_like"?

Cc: steven.s...@gmail.com

@spyder-bot
Copy link
Collaborator Author

From steven.s...@gmail.com on 2014-02-07T06:38:46Z

Yep, it was a copy and paste error:

diff -r e7152f97cdfe spyderlib/widgets/sourcecode/codeeditor.py
--- a/spyderlib/widgets/sourcecode/codeeditor.py Tue Jan 14 23:24:06 2014 -0600
+++ b/spyderlib/widgets/sourcecode/codeeditor.py Fri Feb 07 08:38:23 2014 -0600
@@ -288,7 +288,7 @@
class CodeEditor(TextEditBaseWidget):
"""Source Code Editor Widget based exclusively on Qt"""
LANGUAGES ={ 'Python': (sh.PythonSH, '#', PythonCFM),

  •             'Cython': (sh.Fortran77SH, 'c', PythonCFM),
    
  •             'Cython': (sh.Fortran77SH, '#', PythonCFM),
              'Fortran77': (sh.Fortran77SH, 'c', None),
              'Fortran': (sh.FortranSH, '!', None),
              'Idl': (sh.IdlSH, ';', None),
    

@spyder-bot
Copy link
Collaborator Author

From ndie1...@gmail.com on 2014-02-08T08:53:00Z

Nice! Thanks for the find.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-02-12T09:05:08Z

Status: Accepted
Labels: MS-v2.3 Cat-Editor

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-02-12T09:11:21Z

This issue was updated by revision 274272c121ae .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant