Open itmm opened 10 years ago
Good idea. Would then need to add an option to turn it off.
Not sure how this can be done yet, but if it’s possible this would be pretty nice. Wonder why I never thought of that before!
This will require upstream (Hoedown) support so that we can map source file locations (a range of text to syntax-check) with rendering results (whether a block/span is code). Will work on the backend first before coming back for this.
I don't think link URLs need spell checking—it's distracting if the doc has lots of links.
What does the upstream label mean?
It means this is a problem inherited from an library MacDown depends on (upstream component in tech jargon).
In this particular case, the spell checker needs to be aware of a location of the code block (or URL etc.) in the file to be able to exclude it from being spell-checked. This requires the parser to support this feature, and the one we use now currently doesn’t.
A workaround could be to run the text through data detectors and exclude the URLs this way. Relative links wouldn’t work, of course.
Is this issue still alive? We write a lot of docs using MacDown. The spellchecker in code blocks is real annoying.
A possibility could be to get the document, remove all code / url / frag etc from the text. And hand that text over to the spell checker!?
Is it possible to adjust the spell checking, so it won't mark everything in code fragments that are put in the markdown with single back ticks (
v_args
) or as blocks like the following one?