From: David E. <dm...@dm...> - 2016-01-21 09:40:47
|
Improvements to the scanning of XML tags and properties: - Allow for white space after the parameter assignment sign (=). - Don't allow a closing angle bracket (>) in parameter names. - Skip trailing white space before looking for node termination (> or />). - Match syntax table white space rather than enumerating the white space characters inline. --- jabber-xml.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jabber-xml.el b/jabber-xml.el index 46762ed..e19a247 100644 --- a/jabber-xml.el +++ b/jabber-xml.el @@ -111,15 +111,16 @@ enough for us." (if (search-forward "]]>" nil t) (goto-char (match-end 0)) (throw 'unfinished nil))) - ((looking-at "<\\([^ \t\n/>]+\\)\\([ \t\n]+[^=]+='[^']*'\\|[ \t\n]+[^=]+=\"[^\"]*\"\\)*") + ((looking-at "<\\([^[:space:]/>]+\\)\\([[:space:]]+[^=>]+=[[:space:]]*'[^']*'\\|[[:space:]]+[^=>]+=[[:space:]]*\"[^\"]*\"\\)*") (let ((node-name (match-string 1))) (goto-char (match-end 0)) + (skip-syntax-forward "\s-") ; Skip over trailing white space. (cond ((looking-at "/>") (goto-char (match-end 0)) t) ((looking-at ">") - (forward-char 1) + (goto-char (match-end 0)) (unless (and dont-recurse-into-stream (equal node-name "stream:stream")) (loop do (skip-chars-forward "^<") -- 2.6.3 |