Skip to content

Commit

Permalink
Expand the regex for "full width" markdown elements (#1750)
Browse files Browse the repository at this point in the history
Addresses #442
  • Loading branch information
alanz authored Jun 6, 2020
1 parent b80f62f commit fd6c372
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -4863,9 +4863,16 @@ Stolen from `org-copy-visible'."
"Render markdown."

(let((markdown-enable-math nil))
;; temporary patch --- since the symbol is not rendered fine in lsp-ui
;; Temporary patch --- since the symbol is not rendered fine in lsp-ui
;; Anything that renders full-width disturbs the width calculation
;; of the resulting hover window.
;; See https://github.com/emacs-lsp/lsp-ui/issues/442
(goto-char (point-min))
(while (re-search-forward "^[-]+$" nil t)
(while (re-search-forward
(rx (or
(seq bol (+ "-") eol)
(seq "\* \* \*" eol)))
nil t)
(replace-match ""))

(goto-char (point-min))
Expand Down

0 comments on commit fd6c372

Please sign in to comment.