-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Convert noteblocks for glossary folder #35067
Conversation
This PR converts the noteblocks for the 'glossary' folder to GFM syntax, using a [conversion script](https://github.com/queengooborg/mdn-toolkit/blob/main/upgrade-noteblock.js).
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.
@queengooborg There is a rendering difference with an extra blank line:
And I don't find it acceptable to make this change, because it doesn't appear revertible to me (once we make this workaround it would be hard to discover all places that are intended as workaround, vs. those intended to start a new paragraph). We may have to wait on the Prettier bug.
In your conversion script, could you not do conversion for any note that starts with non-letters?
In the meantime, I think we should revert all notes with the > \[![A-Z]+\]\n>\n
form to the previous state (except callouts, which were supposed to look like that). There aren't many on main.
Agh, okay, there is a difference in rendering, whoops -- I genuinely thought that I had added logic to make the rendering identical with a newline in between... 🤦♀️
I could make that change, but, uh...I already ran the script on all the files locally, fixed issues related to Prettier/Markdownlint malformatting, and submitted PRs for the vast majority of the docs... 😅 Truth be told, I don't think that this rendering difference is too much of an issue if it was styled better (AKA, more like how GitHub renders the noteblocks). But that's just my opinion and would be something that should be discussed before proceeding with! |
@queengooborg Fear not, I'm checking out each of your branches and running a regex search on each one, so you can just look at the cases I pointed out. If you want to do a self-check first, you can search
Agreed; I would be equally happy if we render like GitHub (put "Note" on a separate line). |
@queengooborg Hello. I recently confirmed this change in the |
There isn't really a guide for performing the conversion, even for English content -- but there is a script I wrote, which can be found in the description of this PR! Edit: thinking about it again, I'd say that the closest thing to a guide would be the Markdown in MDN page -- so completing mdn/translated-content#14373 would help! |
That's correct -- the magic keywords should stay in English now, rather than being localized. This ensures consistency across locales and better compatibility with Markdown renderers besides Yari (like GitHub's web editor)! |
@queengooborg, @Josh-Cena How about adding prettier ignore?
|
I don't find it necessary and it adds more noise than just keeping it unmigrated. |
This PR converts the noteblocks for the 'glossary' folder to GFM syntax, using a conversion script.