diff --git a/eldoc-box.el b/eldoc-box.el index d87f2fc..0ccb422 100644 --- a/eldoc-box.el +++ b/eldoc-box.el @@ -177,6 +177,7 @@ It will be passes with two arguments: WIDTH and HEIGHT of the childframe.") (defvar eldoc-box-buffer-hook '(eldoc-box--prettify-markdown-separator eldoc-box--replace-en-space eldoc-box--remove-linked-images + eldoc-box--remove-noise-chars eldoc-box--fontify-html eldoc-box--condense-large-newline-gaps) "Hook run after buffer for doc is setup. @@ -705,6 +706,13 @@ height." nil t) (replace-match "")))) +(defun eldoc-box--remove-noise-chars () + "Remove some noise characters like carriage return." + (save-excursion + (goto-char (point-min)) + (while (search-forward "\r" nil t) + (replace-match "")))) + (defun eldoc-box--fontify-html () "Fontify HTML tags and special entities." (save-excursion