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

RegEx does not always find correct start of an attribute #2

Open
MrBeee opened this issue Oct 27, 2022 · 0 comments
Open

RegEx does not always find correct start of an attribute #2

MrBeee opened this issue Oct 27, 2022 · 0 comments

Comments

@MrBeee
Copy link

MrBeee commented Oct 27, 2022

I'm using QGIS an Open-Source GIS application, that allows you to write a Coordinate Reference System (CRS) to a QDom element, using its WriteXml() function. This produces a WKT string that QCodeEditor incorrectly interprets as the start of an xml attribute. The reason for this is (I believe) that the start of an xml-attribute is simply determined by QRegExp("""). Instead, the expression should first look back one character, to check if this double quote has been preceded by an '=' sign. If not, then the attribute hasn't started yet. Please have a look at the attached xml snippet and load it in QCodeEditor to see what I mean. Please note that I don't use text wrapping in my QCodeEditor widget.

Cheers, Bart

xml-snippet.txt

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

No branches or pull requests

1 participant