pawamoy / mkdocs-spellcheck

A spell checker plugin for MkDocs.
https://pawamoy.github.io/mkdocs-spellcheck/
ISC License
16 stars 4 forks source link

Ignore `<style>` and `<script>` tags #18

Closed Archmonger closed 1 year ago

Archmonger commented 1 year ago

Is your feature request related to a problem? Please describe. I'm trying to create page-specific styles by writing raw HTML <style> tags within my markdown docs, but they generate a whole ton of spell check warnings.

Describe the solution you'd like Style tags should be skipped for spell checking, since there is zero possibility of them containing English words. This should extend to script tags as well, if they're not skipped already.

This is probably best done by replacing the ignore_code: yes parameter with ignored_tags: [code, script, style]

pawamoy commented 1 year ago

Yep, definitely! Would you like to send a PR :slightly_smiling_face:? You can add a new ignore_tags option which defaults to ["code", "script", "style"]. We will deprecate the ignore_code one. Also note that this issue is a duplicate of #5, so I'll close it :slightly_smiling_face: