diff options
author | Thanos Apollo <[email protected]> | 2023-10-14 16:23:20 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-10-17 09:24:22 +0300 |
commit | 787d24e4bc7acfe74923c341813d483544965b4c (patch) | |
tree | b0d3751e3067b40f9282bd9d0ecdd40dda983eef | |
parent | fbf3a9309e52913fc80e5a82a292ff75e54c5068 (diff) |
yeetube-buffer: Remove (fix-title)
Fix titles before they are pushed in yeetube-content with previous
commit.
-rw-r--r-- | yeetube-buffer.el | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/yeetube-buffer.el b/yeetube-buffer.el index 0ef7134..119c07f 100644 --- a/yeetube-buffer.el +++ b/yeetube-buffer.el @@ -75,22 +75,6 @@ Emojis cause formatting issues, this should be off by default." (equal (aref char-script-table c) 'emoji)) str)) -;; Usually titles from youtube get messed up, -;; This should fix some of the common issues. -(defun yeetube-buffer-fix-title (title) - "Adjust TITLE." - (let ((replacements '(("&" . "&") - (""" . "\"") - ("'" . "'") - ("u0026" . "&") - ("\\\\" . "")))) - (mapc (lambda (replacement) - (setf title (replace-regexp-in-string (car replacement) (cdr replacement) title))) - replacements) - (if yeetube-buffer-display-emojis - title - (yeetube-buffer-strip-emojis title)))) - (defun yeetube-buffer-fix-view-count (view-count) "Fix VIEW-COUNT display issues." (replace-regexp-in-string "[^0-9]" "" view-count)) @@ -184,8 +168,7 @@ Emojis cause formatting issues, this should be off by default." "Insert formatted CONTENT." (insert (concat - (yeetube-buffer--format-title (yeetube-buffer-fix-title - (cl-getf content :title))) + (yeetube-buffer--format-title (cl-getf content :title)) (yeetube-buffer--format-view-count (yeetube-buffer-view-count-add-commas (yeetube-buffer-fix-view-count (cl-getf content :view-count)))) |