-
Notifications
You must be signed in to change notification settings - Fork 22.7k
HTML ➡️ Markdown: Web/JavaScript/Reference/Global_Objects/Map #6194
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
title: 'Map.prototype[@@iterator]()' | ||
slug: Web/JavaScript/Reference/Global_Objects/Map/@@iterator | ||
tags: | ||
- ECMAScript 2015 |
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.
Could the script also indent tags that are at the beginning of the line? (like it is in the next file)?
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.
Unfortunately that is just an artifact of the given frontmatter being formatted that way. That said, I have heard interest in adding prettier to the content tooling, which can also handle the YAML in the frontmatter.
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.
Is this the formatting you get when you save a document through the API?
I don't know if a human typed these but I think I've seen that when I apply the fixable flaws, it writes the tags
with indentation.
So if someone someday presses the "Fix fixable flaws" and it goes through the fm
API, will it come out like you have it here in this PR?
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.
Ok, the way we write the front-matter actually has nothing to do with fm
. It's as simple as this: https://github.com/mdn/yari/blob/fd7b368a9a0825c0ae9bcfa028461b678865453e/content/document.js#L125
yaml.dump(saveMetadata)
And that uses indentation:
> const yaml = require("js-yaml");
undefined
> console.log(yaml.dump({tags: ['Foo', 'Bar']}))
tags:
- Foo
- Bar
Therefore, next time someone touches this file, to do something like fixing fixable flaws, it'll cause a 6 lines diff just for indenting the tags
.
I'm not a reviewer but I think we should fix the h2m so that when it writes the front-matter back into |
I created an issue for it over in Yari mdn/yari#4069 |
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.
I've looked at the MD sources for this and the built pages, and they all look great. I also did a bit of playing with introducing flaws and they get picked up too.
Awesome work @Gregoor !
107a4db
to
6cd4edc
Compare
Days without a horrific git accients: 0 Looks like I accidently pulled in too many commits just now, while I was actually just trying to create a minimal diff for adding Peter's changes to make the YAML nicer (addressing @teoli2003's comment). I both did not achieve that and also my massive commit chain tagged a BILLION PEOPLE to review this PR. To you billions: I am sorry. I had to force-push the last commit to undo it, which also means there is no diff to where you last reviewed Will, but converter-wise the only thing that changed is that the front-matter YAML gets dumped nicely and consistently. So there should be no additional changes needed to review (which I did see in my local diff, but yeah I botched something when pushing it up here) |
@Gregoor I was requested as reviewer via |
@Ryuno-Ki no need for you eyes, sorry for the accidental ping. I accidently included unrelated commits which tagged a whole bunch of people in. |
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.
I checked out the pr & everything looks 👌 to me!
I say do it 🙈
Alright, Gregoor. It happens. Nothing to be ashamed of. |
subset of #5193
We are thinking of starting with this slice as a safe first test of Markdowning. This PR would basically check Number 5 from the list here #5808
I reviewed these pages last week and they were visually identical (apart from the missing styling that having
<var>
s added). We did do some more fixing for the converter but that should not have these pages affected.I also did do a manual change, which is stripping the
span.seoSummary
tag, which is not yet being stripped due to a bug (fix in progress).Conversion Report (basically only crying about tables)
Report from 6/21/2021, 4:44:14 PM
Top 20 unhandled elements
Details per Document
/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
Invalid AST transformations
tr (54:5) => tableRow
td (65:7) => tableCell
tr (61:5) => tableRow
tr (76:5) => tableRow
td (85:7) => tableCell
td (90:7) => tableCell
tr (83:5) => tableRow
tr (108:5) => tableRow
td (121:7) => tableCell
tr (116:5) => tableRow
td (147:7) => tableCell
td (151:7) => tableCell
tr (145:5) => tableRow
td (157:7) => tableCell
td (161:7) => tableCell
tr (155:5) => tableRow
table.standard-table (52:1) => table
Missing conversion rules