Skip to content

A Quarto filter to print misspelled words to the console using Hunspell

License

Notifications You must be signed in to change notification settings

christopherkenny/spellcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spellcheck Extension For Quarto

This extension provides a filter to run Hunspell every time a .qmd file is rendered and prints any misspellings to the console.

You must have Hunspell installed for this to run. For Windows, the portable version from Chocolately seems to run well (choco install hunspell.portable). On Mac, you can install with Homebrew (brew install hunspell).

Installing

From a directory with an existing Quarto file or project, run:

quarto add christopherkenny/spellcheck

This will install the extension under the _extensions subdirectory. If you're using version control, you will want to check in this directory.

Using

Add the following to your metadata after installing as above.

filters:
  - spellcheck

This will print to the console, something which looks like:

Possibly misspelled words:
--------------------------
consol
listd
spelld
--------------------------

The default language used is en_US. This can be configured by setting:

spellcheck-lang: en_US

If you specify a spelling language which cannot be found by Hunspell, the program will error.

You can also specify words to ignore:

spellcheck-ignore:
  - words

Note: This will create a file .spellcheck.txt in the current directory which will be automaticaly removed, during normal functioning. If it fails during the Hunspell step, then you may need to remove that file.

Example

Here is the source code for a minimal example: example.qmd.

Licensing

The original Lua filter for pandoc is licensed under MIT from John MacFarlane. All modifications by me are licensed under the MIT license. See the license file for futher details.

About

A Quarto filter to print misspelled words to the console using Hunspell

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages