From 2fa8f1b77a66a486d67aaa0ced062b1eb4ff9f88 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 30 Oct 2022 14:30:56 +0100 Subject: [PATCH] elide-head: Make trailing "/" in URL optional * lisp/elide-head.el (elide-head-headers-to-hide): Make trailing "/" in the gnu.org URL optional for the GPL. * test/lisp/elide-head-tests.el (elide-head--test-headers-to-hide/gpl3-5): New test. --- lisp/elide-head.el | 4 ++-- test/lisp/elide-head-tests.el | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lisp/elide-head.el b/lisp/elide-head.el index 90bf1fe35b5..75a3612df91 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el @@ -53,8 +53,8 @@ `(;; GNU GPL ("is free software[:;] you can redistribute it" . ,(rx (or (seq "If not, see " (? "<") - "http" (? "s") "://www.gnu.org/licenses/" - (? ">") (? " ")) + "http" (? "s") "://www.gnu.org/licenses" + (? "/") (? ">") (? " ")) (seq "Boston, MA " (? " ") "0211" (or "1-1307" "0-1301") (or " " ", ") "USA") diff --git a/test/lisp/elide-head-tests.el b/test/lisp/elide-head-tests.el index 6f351170f1d..429ef266572 100644 --- a/test/lisp/elide-head-tests.el +++ b/test/lisp/elide-head-tests.el @@ -3,7 +3,6 @@ ;; Copyright (C) 2020-2022 Free Software Foundation, Inc. ;; Author: Simen Heggestøyl -;; Keywords: ;; This file is part of GNU Emacs. @@ -20,10 +19,6 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;;; Commentary: - -;; - ;;; Code: (require 'elide-head) @@ -169,6 +164,22 @@ ***************************************************************************/ " "This program is distributed in the hope that") +;; from mentor.el [no "/" in the gnu.org URL] +(elide-head--add-test gpl3-5 "\ +;; Mentor is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Mentor is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Mentor. If not, see . +" "Mentor is distributed in the hope that") + ;;; GPLv2 -- 2.39.5