Feature request #11731

replace pygments highlighting with QScintilla

Added by Tom Kralidis almost 10 years ago. Updated over 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:MetaSearch Catalogue Client
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:19966

Description

As suggested by @alexbruy, since the latter is part of QGIS core, replace pygments syntax highlighting funcitonality (contained to `MetaSearch.util.highlight_xml`) with something just as simple, and remove the pygments dependency and bundling for plugin.

sample:

import sys
from PyQt4.QtGui import QApplication
from PyQt4 import QtCore, QtGui
from PyQt4.Qsci import QsciScintilla, QsciScintillaBase, QsciLexerXML

if __name__ == "__main__":
    app = QApplication(sys.argv)
    editor = QsciScintilla()
    ## Choose a lexer
    editor.setLexer(QsciLexerXML())
    ## Render on screen
    editor.show()

    xml = '''
    <body>
        <title id="5">foo</title>
    </body>'''
    ## Show this file in the editor
    editor.setText(xml)
    sys.exit(app.exec_())

History

#1 Updated by Tom Kralidis over 9 years ago

  • Project changed from 218 to QGIS Application

#2 Updated by Tom Kralidis over 9 years ago

  • Category set to MetaSearch Catalogue Client

#3 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF