From: F. Jason Park Date: Fri, 1 Jul 2022 12:47:31 +0000 (-0700) Subject: ; Fix regexp in ERC test-server utility X-Git-Tag: emacs-29.0.90~1447^2~1297 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a0ec8958a3026d04101a0501d117a0195df8097;p=emacs.git ; Fix regexp in ERC test-server utility * test/lisp/erc/resources/erc-d/erc-d-i.el (erc-d-i--tag-unescaped-regexp): Thanks to Mattias and relint for catching this. --- diff --git a/test/lisp/erc/resources/erc-d/erc-d-i.el b/test/lisp/erc/resources/erc-d/erc-d-i.el index 27b1bf60839..db113335a82 100644 --- a/test/lisp/erc/resources/erc-d/erc-d-i.el +++ b/test/lisp/erc/resources/erc-d/erc-d-i.el @@ -39,14 +39,14 @@ UTF-8 text before parsing, which is nonstandard." (defconst erc-d-i--tag-escapes '((";" . "\\:") (" " . "\\s") ("\\" . "\\\\") ("\r" . "\\r") ("\n" . "\\n"))) -;; XXX these are not mirror inverses; unescaping may degenerate -;; original by dropping stranded/misplaced backslashes. +;; These are not mirror inverses; unescaping may drop stranded or +;; misplaced backslashes. (defconst erc-d-i--tag-escaped-regexp (rx (or ?\; ?\ ?\\ ?\r ?\n))) (defconst erc-d-i--tag-unescaped-regexp (rx (or "\\:" "\\s" "\\\\" "\\r" "\\n" - (seq "\\" (or string-end (not (or ":" "n" "r" "\\"))))))) + (seq "\\" (or string-end (not (or ":" "s" "n" "r" "\\"))))))) (defun erc-d-i--unescape-tag-value (str) "Undo substitution of char placeholders in raw tag value STR." @@ -65,8 +65,6 @@ UTF-8 text before parsing, which is nonstandard." (defconst erc-d-i--invalid-tag-regexp (rx (any "\0\7\r\n; "))) -;; This is `erc-v3-message-tags' with fatal errors. - (defun erc-d-i--validate-tags (raw) "Validate tags portion of some RAW incoming message. RAW must not have a leading \"@\" or a trailing space. The spec says