codespell-project / actions-codespell

MIT License
74 stars 19 forks source link

Ignored words are still detected in markdown code-block #73

Closed tvdijen closed 11 months ago

tvdijen commented 11 months ago

Hi!

I noticed that words that are on my ignore-list are still detected when they are inside a markdown-codeblock:

My config:

- name: Perform spell check
  uses: codespell-project/actions-codespell@master
  with:
    path: '**/*.md'
    check_filenames: true
    ignore_words_list: tekst,Widgits

Leads to:

Error: docs/simplesamlphp-googleapps.md:41: Widgits ==> Widgets

See file: https://github.com/simplesamlphp/simplesamlphp/commit/73563071059752319c6da1f7c2e4b1a6fcad444c#annotation_14814240076

per1234 commented 11 months ago

HI @tvdijen. The codespell dictionary entries are all lowercase. Even though the misspelling check is case insensitive when it comes to the text being checked, the entries in the ignore_words_list input must match the case of the dictionary entries exactly. So you must always use lowercase in the ignore_words_list input.

So try again after changing the input to this:

ignore_words_list: tekst,widgits
tvdijen commented 11 months ago

Ah thank you very much @per1234 , that has indeed solved the issue!

I must say that the docs are not immediately clear to me.. Maybe because I'm not native English, or because "[..] based on how they are written in the dictionary file" doesn't immediately mean something to me as an end-user.. I never see dictionary files when using this action.

Thanks very much for the swift response, and I hope my feedback can help you to make this action even better!