X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sface%2Fxmlwidget.py;h=d72f8e8701a1285924fee9cb4611a786774d09d4;hb=a7c0b9ff7462d0019158d478d892a8b73bb28607;hp=2c0f53ca951386345026d328c45e5ad31a060ef2;hpb=eb6b726661868a93d439c030ead00f4b7a2fe0a7;p=sface.git diff --git a/sface/xmlwidget.py b/sface/xmlwidget.py index 2c0f53c..d72f8e8 100644 --- a/sface/xmlwidget.py +++ b/sface/xmlwidget.py @@ -1,5 +1,6 @@ import os import sys +import re from PyQt4.QtCore import * from PyQt4.QtGui import * @@ -238,9 +239,12 @@ class ElemNodeDelegate(QAbstractItemDelegate): AttListHtml = '' if len(tmp) > 1: # many elems don't have atts... - attList = tmp[1].split() + pttrnAtt = ' *?.+.?=".*?"' + print "TMP", tmp + attList = re.compile(pttrnAtt, re.DOTALL).findall(tmp[1]) for att in attList: tmp = att.split('=') + print "TMP2", tmp attName = tmp[0] attValue = tmp[1][1:-1] AttListHtml += (attPattern % (attName, attValue))