]> git.eshelyaron.com Git - emacs.git/commitdiff
Preserve <title> in the Emacs manuals
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 4 Jul 2022 10:47:16 +0000 (12:47 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 4 Jul 2022 10:47:16 +0000 (12:47 +0200)
* admin/admin.el (manual-html-fix-headers): Preserve the <title>
element (bug#48334).

admin/admin.el

index 2d809313ca4a91968889efbccb3f0a5f3922f2c6..c84287a702478bf67c1d25a72c2d0e34d5062ff4 100644 (file)
@@ -488,10 +488,11 @@ the @import directive."
       (delete-region opoint (point))
       (search-forward "<meta http-equiv=\"Content-Style")
       (setq opoint (match-beginning 0)))
+    (search-forward "<title>")
+    (delete-region opoint (match-beginning 0))
     (search-forward "</title>\n")
-    (delete-region opoint (point))
-    (search-forward "<link href=")
-    (goto-char (match-beginning 0))
+    (when (search-forward "<link href=" nil t)
+      (goto-char (match-beginning 0)))
     (insert manual-links-string)
     (setq opoint (point))
     (search-forward "</head>")