Open jrzyshr opened 3 months ago
It is unclear to me how you've configured pyspelling or its related filters. Please provide a minimal, reproducible example.
Here's the Pyspelling config on our repo: https://github.com/microsoft/WhatTheHack/blob/master/.github/workflows/spell-check/spellcheck.yml
Here's a minimal sample Markdown that will cause pyspelling to flag errors where there shouldn't be:
If you want to set up the developer environment on your local workstation, expand the section below and follow the requirements listed.
<details markdown=1>
<summary markdown="span"><strong>Click to expand/collapse Hidable Section</strong></summary>
Some content
`code snippet foobar`
[link](https://url.notarealword.com)
More content
</details>
In the sample MD snippet above, "notarealword" from the URL, and "foobar" from the codesnippet are flagged by pyspelling. I assume it's because the pyspelling markdown filter is not rendering content after the details tag to HTML, and thus the pre, code, and a (href) tags are not being rendered in the HTML output that is being sent to the spell checker, so the spell checker treats them like any other text.
So, the current Markdown filter is using Python Markdown. Python Markdown will not process "Markdown content" in a block HTMl tag unless md_in_html
extension is included, which I assume was your intention as you've added markdown=1
, but I do not see that extension included in your config; therefore, no code blocks are rendered inside of <details>
nor any links.
Thank YOU! That was the fix! I guess I was only looking at your extensions (https://facelessuser.github.io/pymdown-extensions/extensions/), not the extensions for Python Markdown themselves.
I'm happy to close the issue, but not sure if it's worth calling this out for others who may stumble upon the same scenario?
It wouldn't hurt to mention in the filter documentation that people can use the built-in markdown extensions or others.
I recently started adding collapsible sections to the Markdown files in my repo to hide certain sections as per the GitHub docs: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections
Markdown sample from the GitHub docs link above: