tbroadley / spellchecker-cli

A command-line tool for spellchecking files.
MIT License
119 stars 16 forks source link

Add support for TOML to the frontmatter plugin #59

Closed bryanfriedman closed 4 years ago

bryanfriedman commented 4 years ago

I ran into a case where we were using both TOML and YAML for frontmatter and it turned out the spellchecker was assuming YAML and not ignoring TOML frontmatter. I believe this additional code will allow for either TOML or YAML frontmatter to be ignored or parsed correctly when keys are specified.

bryanfriedman commented 4 years ago

That file was a toml version of the frontmatter.md file that was already there and I didn’t see a test that one either. I think the frontmatter tests get covered okay by the frontmatter-incorrect*md files so I can delete those other two if we don’t need them.

And yes, I can add a section to the readme and changelog but I wasn’t sure what section to put it in. Do the changes go under [unreleased] in the changelog or do I create a new version section?

tbroadley commented 4 years ago

That file was a toml version of the frontmatter.md file that was already there and I didn’t see a test that one either. I think the frontmatter tests get covered okay by the frontmatter-incorrect*md files so I can delete those other two if we don’t need them.

Understood - it makes sense to me to delete those two files. I might add them back later and add tests for them. Good catch!

And yes, I can add a section to the readme and changelog but I wasn’t sure what section to put it in. Do the changes go under [unreleased] in the changelog or do I create a new version section?

Yes, they go under [unreleased] - sorry for the confusion. I'll move the line to a new version section when I create a new version of the package containing this change.

bryanfriedman commented 4 years ago

Perfect. I’ll get that all updated today. Thanks!

bryanfriedman commented 4 years ago

@tbroadley Hope this is good to go now. Thanks for the help!

tbroadley commented 4 years ago

Ah as it turns out one of the tests did use frontmatter.md. It expected there to be two fixtures for each plugin (including frontmatter): one with no errors and one containing some errors. I've added the file back.

tbroadley commented 4 years ago

Thanks for the contribution! I just release v4.3.0, which contains this change.