-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flyspell not checking yml data #560
Comments
diff --git a/markdown-mode.el b/markdown-mode.el
index a1e37e0..a92a5c8 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -2150,7 +2150,8 @@ Depending on your font, some reasonable choices are:
Used for `flyspell-generic-check-word-predicate'."
(save-excursion
(goto-char (1- (point)))
- (if (or (markdown-code-block-at-point-p)
+ (if (or (and (markdown-code-block-at-point-p)
+ (not (markdown-text-property-at-point 'markdown-yaml-metadata-section)))
(markdown-inline-code-at-point-p)
(markdown-in-comment-p)
(markdown--face-p (point) '(markdown-reference-face I suppose above patch fixes your issue. However I don't understand yet why original code ignores spell checking in YAML meta header. |
Thanks - this seems to solve the problem at hand at least. I end up with lots of spelling errors for the metadata keys too but I'd rather have too many errors highlighted rather than too few for now. |
I will apply above patch after merging #559 for avoiding code conflict. |
I have merged #561. Please check latest version. |
Thanks again - all fixed 👍 |
Expected Behavior
The yml metadata at the top of the file contains important information including titles as well as code. Some of these should be spell checked by default. I would at least think it would be good to check for strings in quotes (i.e. "title") and spell check those.
Actual Behavior
The whole yml block is treated as code so nothing here picked up by flycheck leading to spelling mistakes in my title :(
Steps to Reproduce
Download two files.
test.el.txt
andtest.md.txt
and remove .txt extension (needed for uploading?!):test.el.txt
test.md.txt
Run
emacs -Q -l test.el test.md
See asdasdasd in the main body highlighted as spelling error but not in the title.
Example output:
Backtrace
Software Versions
The text was updated successfully, but these errors were encountered: