-
Notifications
You must be signed in to change notification settings - Fork 16
Test for irregular whitespaces #1262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 🙇🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.