Test for irregular whitespaces - #1262
Conversation
|
@Mpdreamz It seems we've tons of irregular whitespaces in docs-content... smoke tests are failing. I could confirm this by running a search from VSCode. https://github.com/elastic/docs-builder/actions/runs/15064731599/job/42346927067?pr=1262 Whether all those instances are problematic is to be seen. We could perhaps switch to a hint instead of a warning. |
Mpdreamz
left a comment
There was a problem hiding this comment.
Great addition @theletterf !
We should make this part of the markdown parser since it more efficiently reads the files and exposes the contents as Span<T>.
That way we don't do double reads. Happy to ammend this PR to move these checks over there.
Making it a HINT first seems like a good idea while we go over all the repositories to fix it.
|
Thanks! Happy if you'd do both changes, so I can learn 🙇🏻 |
Irregular whitespaces, which are often inserted by mistake when using code editors, can break Markdown formatting. A way of mitigating this in VS Code is to use the Fix Irregular Whitespace extension, which detects and immediately edits these invisible characters.
This PR adds some irregular whitespace checking logic to the Markdown parser.