Replies: 0 comments 21 replies
-
@chrisdavidmills FWIW the wiki used to randomly inject these (at least that's how it felt). IMO we should remove all of them and start injecting them again when needed. But perhaps this should be done by someone who has merge rights across the wiki so that it can be done when there are no other PRs that might result in conflicts. |
Beta Was this translation helpful? Give feedback.
-
Other approach my be doing some batching, but I agree with @hamishwillee that it's probably better done by one of the maintainers that can sneak the batches in between PRs |
Beta Was this translation helpful? Give feedback.
-
Yeah, maybe one of our devs could handle this one. |
Beta Was this translation helpful? Give feedback.
-
@peterbe This something you would handle? |
Beta Was this translation helpful? Give feedback.
-
Wow. I didn't realize how many there were! I wrote a little Python script and concluded that it exists in 4,853 of the files in mdn/content. But perhaps we can start with getting rid of it as part of the fixable flaws. Because when you run fixable flaws, it edits the raw I'm actually not super familiar with the functionality. I actually don't know why JavaScript won't print it when you
which can easily be replaced to:
Are there instances where they actually are useful? I definitely don't think we should over-worry about this because it seems pretty harmless at the moment. And fixing it might create more confusion and noise than necessary. Perhaps we just accept and learn to live it with as is. Perhaps we sweepingly fix it all when we convert from HTML to something Markdownish. |
Beta Was this translation helpful? Give feedback.
-
I think if they are contained in double quotes, or the only character in |
Beta Was this translation helpful? Give feedback.
-
Running the following:
…and looking through the output, I find some things like the following:
…where in
…in Running:
…says we have 68 cases like those in the tree — cases where somebody has intentionally used a non-breaking space to try to ensure that a certain string containing whitespace doesn’t get broken across lines. |
Beta Was this translation helpful? Give feedback.
-
So it's useful in a bunch of pages, thus making it hard to sweepingly and basically replace all. Perhaps park this in the back of our heads rather than front of the roadmap. |
Beta Was this translation helpful? Give feedback.
-
Hmm, would a flaw that replaces them with the entity |
Beta Was this translation helpful? Give feedback.
-
Or leave it in the cases where it makes sense and replace it with the empty string where it doesn't make sense. |
Beta Was this translation helpful? Give feedback.
-
It could also be used if you have a brand name which must not be broken apart (think Would it make sense to categorise the hits by elements and attributes and tell the script to blacklist certain elements and attributes? (Thinking of |
Beta Was this translation helpful? Give feedback.
-
FWIW
So my two bits - automate, omitting the cases inside code markup. Fix the likely very small number of actual problem cases as we come to them. |
Beta Was this translation helpful? Give feedback.
-
@wbamberg do you think maybe we could remove these non-breaking spaces as part of the markdown conversion? They should be valid markdown too, but they aren't generally "useful" and IMO were mostly injected by error by the old Wiki infrastructure. |
Beta Was this translation helpful? Give feedback.
-
Looks like there are quite a lot across the files. I think there may be some cases where they make sense, but probably a general cleanup makes sense. I didn't want to send a PR because it would touch thousands of files and would be un-reviewable.
Beta Was this translation helpful? Give feedback.
All reactions