-
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 HTTP to Markdown #7853
Convert HTTP to Markdown #7853
Conversation
This comment has been minimized.
This comment has been minimized.
The first paragraph of The HTTP {{HTTPHeader("Content-Security-Policy")}} (CSP)
**`navigate`\*\***`-to`** directive
restricts the URLs to which a document can initiate navigations by any means including
{{HTMLElement("form")}} (if {{CSP("form-action")}} is not specified),
{{HTMLElement("a")}}, {{DOMxRef("window.location")}}, {{DOMxRef("window.open")}}, etc.
This is an enforcement on what navigations this document initiates **not\*\*
on what this document is allowed to navigate to. Can kind of see what from Looking at the HTML source: <p>The HTTP {{HTTPHeader("Content-Security-Policy")}} (CSP)
<code><strong>navigate</strong></code><strong><code>-to</code></strong> directive
restricts the URLs to which a document can initiate navigations by any means including
{{HTMLElement("form")}} (if {{CSP("form-action")}} is not specified),
{{HTMLElement("a")}}, {{DOMxRef("window.location")}}, {{DOMxRef("window.open")}}, etc.
This is an enforcement on what navigations this document initiates <strong>not</strong>
on what this document is allowed to navigate to.</p> Anyway, I pushed a fix to the branch. |
Heads up, the button currently show „squash and merge“ to me. |
General comment: 144 out of the 297 — almost 50% — of the markdown files in this PR have HTML tables that failed conversion. That seems like relatively a lot — so I wonder if maybe there’s some automated way we could pre-process the sources to prevent the table conversion from failing. |
I pushed a series of commits for some other issues I found when randomly checking a sample of files from the PR, and from running markdownlint. |
|
||
The response is extremely simple too: it only consisted of the file itself. | ||
|
||
<HTML> |
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.
Even though the indentation works as a method of indicating pre/code blocks, I see using the backticks as a much "safer" markup.
It looks like the converter does it this way for everything that is a plain pre in html. Suggest we ask for that to be changed. Reasons
- very easy to stuff up up when editing - forget to indent one thing
- Both yari and github support markup if you specify the codeblock type as
http
. If we add the backticks to start with, remembering to add http later is easy.
So this is what it looks like if you specify the type
GET /mypage.html HTTP/1.0
User-Agent: NCSA_Mosaic/2.0 (Windows 3.1)
200 OK
Date: Tue, 15 Nov 1994 08:12:31 GMT
Server: CERN/3.0 libwww/2.17
Content-Type: text/html
<HTML>
A page with an image
<IMG SRC="/myimage.gif">
</HTML>
@sideshowbarker That is probably the table at the top of every header
Similar to the discussion with @wbamberg on CSS, do you think we might autogenerate these from frontmatter? |
Yeah that would certainly seem do-able without a huge level of effort. But that said, I guess it doesn’t need to block this PR — could be addressed in a follow-up |
Thanks all for the thorough feedback! So here are the next steps I plan to perform:
@sideshowbarker: thanks a lot for the thorough review. I didn't know about markdownlint; it is now installed and integrated with my editor 👍 . We are close! |
I fixed the triple ticks for I think we are good to go! Please have a last look; I will open the promised discussions/follow-up later today, then rebase and merge. |
Alea jacta est. |
This is the final PR that fixes #7536.
Command used:
yarn md h2m web/http --locale en-US --mode replace
Then I made two commits. First the rename, then the modifications. Don't squash merge this!
Conversion report available at: gist
Only the tables with a class
properties
are not converted. There are no other problems reported by the tool.