* lisp/nxml/rng-util.el (rng-collapse-space): Simplify.
This commit is contained in:
parent
fd4aad5697
commit
caabc5a4ab
1 changed files with 2 additions and 7 deletions
|
@ -72,13 +72,8 @@ LIST is not modified."
|
|||
t))
|
||||
|
||||
(defun rng-collapse-space (string)
|
||||
(setq string
|
||||
(replace-regexp-in-string "[ \t\r\n]+" " " string t t))
|
||||
(when (string-match "\\` " string)
|
||||
(setq string (substring string 1)))
|
||||
(when (string-match " \\'" string)
|
||||
(setq string (substring string 0 -1)))
|
||||
string)
|
||||
(string-trim
|
||||
(replace-regexp-in-string "[ \t\r\n]+" " " string t t)))
|
||||
|
||||
(define-error 'rng-error nil)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue