Skip to content

Spell checking tweak for ignoring pandoc references? #572

@paultopia

Description

@paultopia

Hi there,

Is there any interest in adding pandoc-style reference links (of the form [@refmarker]) to the tokens ignored by flyspell?

Right now, I've just implemented this as an advice to markdown-mode in my own init with the following code, but it seems like it might be useful to others, and am happy to turn it into a contribution to this package if there's interest.

  (defun is-ampersand (s)
  (string= "@" s))

  (defun not-cite ()
   (save-excursion
    (forward-word -1)
    (let ((result (is-ampersand (string (preceding-char)))))
     (not result))))

(defun not-cite-advice (orig &rest args)
(if (not-cite)
(apply orig args)))

  (advice-add 'markdown-flyspell-check-word-p :around #'not-cite-advice)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions