From 260ef4efd5ac330dde21b9fef9a51458501799ba Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Wed, 8 Dec 2021 12:32:27 +0100 Subject: clean-quote : add examples in comments and debug "1" -> "P1" rule --- local/bibli-paris/bibli-paris.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'local') diff --git a/local/bibli-paris/bibli-paris.el b/local/bibli-paris/bibli-paris.el index eb8f172..ca00fab 100644 --- a/local/bibli-paris/bibli-paris.el +++ b/local/bibli-paris/bibli-paris.el @@ -186,19 +186,25 @@ date if borrowed and set to the maximum unix date if unavailable." "Remove extra whitespace from and uniformizes the quote QUOTE." (let ((blank "[[:blank:]\r\n]+") (result entry-quote)) + ;; " " -> " " (setq result (replace-regexp-in-string blank " " result)) + ;; "$ " -> "$" (setq result (string-trim result blank blank)) + ;; "BD EN RESERVE" -> "EN RESERVE BD" (setq result (replace-regexp-in-string "BD EN RESERVE" "EN RESERVE BD" result t t)) + ;; "BD MANGA" -> "MANGA" (setq result (replace-regexp-in-string "BD MANGA" "MANGA" result t t)) + ;; "BD COMICS" -> "COMICS" (setq result (replace-regexp-in-string "BD COMICS" "COMICS" result t t)) + ;; "1" -> "01" (setq result (replace-regexp-in-string - "\\([^0-9/]\\)\\([0-9]\\)\\($\\|\/\\)" + "\\([^0-9/]\\)\\([0-9]\\)\\($\\|\/\\| \\)" "\\10\\2\\3" result)) result)) -- cgit v1.2.3