Commit a697d1e6 authored by Paul Eggert's avatar Paul Eggert

Minor xml.el tweaks

* lisp/xml.el (xml-name-start-char-re, xml-name-char-re):
No need to call concat.
(xml-name-char-re): Use \u escapes rather than chars inline,
so that the code matches the comments better and is easier
to audit.
parent 907d11fc
Pipeline #1094 failed with stage
in 49 minutes and 22 seconds
......@@ -176,11 +176,11 @@ See also `xml-get-attribute-or-nil'."
;; [4] NameStartChar
;; See the definition of word syntax in `xml-syntax-table'.
(defconst xml-name-start-char-re (concat "[[:word:]:_]"))
(defconst xml-name-start-char-re "[[:word:]:_]")
;; [4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7
;; | [#x0300-#x036F] | [#x203F-#x2040]
(defconst xml-name-char-re (concat "[-0-9.[:word:]:_·̀-ͯ‿⁀]"))
(defconst xml-name-char-re "[[:word:]:_.0-9\u00B7\u0300-\u036F\u203F\u2040-]")
;; [5] Name ::= NameStartChar (NameChar)*
(defconst xml-name-re (concat xml-name-start-char-re xml-name-char-re "*"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment