FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tools,doc: fix misrendering of consecutive JS blocks by Trott · Pull Request #40146 · nodejs/node · GitHub

/ node Public

tools,doc: fix misrendering of consecutive JS blocks - #40146

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:fix-tools
Closed

tools,doc: fix misrendering of consecutive JS blocks#40146
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:fix-tools

Conversation

Trott commented Sep 18, 2021

Copy link
Copy Markdown
Member

Our markdown-to-html tool was assuming that any consecutive JS blocks
were ESM vs CJS alternatives, but that is not always the case, resulting
in both a confusing interface and invalid HTML.

Our markdown-to-html tool was assuming that any consecutive JS blocks
were ESM vs CJS alternatives, but that is not always the case, resulting
in both a confusing interface and invalid HTML.
nodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Sep 18, 2021

Trott commented Sep 18, 2021

Copy link
Copy Markdown
Member Author

There are three examples of this in the docs. Here is how a part of packages.html should be rendering (and how it renders with this change):

Here's how it looks currently:

The current situation results in a <pre> within another <pre> which is invalid HTML.

Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 18, 2021
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 18, 2021

Copy link
Copy Markdown
Collaborator

aduh95 commented Sep 18, 2021

Copy link
Copy Markdown
Contributor

Weird, I thought I had taken this into consideration with line 227:

nextNode.lang !== node.lang) {

Maybe line 227 can be removed if it's actually not useful.

Trott commented Sep 18, 2021

Copy link
Copy Markdown
Member Author

Maybe line 227 can be removed if it's actually not useful.

I tried removing it but doing so ends up in garbled code examples elsewhere in the docs, so it seems like both statements handle different edge cases.

targos added the fast-track PRs that do not need to wait for 48 hours to land. label Sep 19, 2021

Copy link
Copy Markdown
Contributor

Fast-track has been requested by @targos. Please 👍 to approve.

aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 19, 2021
github-actions Bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 19, 2021

Copy link
Copy Markdown
Contributor

Landed in 0bafe6d...b0d5eec

github-actions Bot closed this Sep 19, 2021
nodejs-github-bot pushed a commit that referenced this pull request Sep 19, 2021
Our markdown-to-html tool was assuming that any consecutive JS blocks
were ESM vs CJS alternatives, but that is not always the case, resulting
in both a confusing interface and invalid HTML.

PR-URL: #40146
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
BethGriggs pushed a commit that referenced this pull request Sep 21, 2021
Our markdown-to-html tool was assuming that any consecutive JS blocks
were ESM vs CJS alternatives, but that is not always the case, resulting
in both a confusing interface and invalid HTML.

PR-URL: #40146
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
BethGriggs pushed a commit that referenced this pull request Sep 21, 2021
Our markdown-to-html tool was assuming that any consecutive JS blocks
were ESM vs CJS alternatives, but that is not always the case, resulting
in both a confusing interface and invalid HTML.

PR-URL: #40146
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
BethGriggs mentioned this pull request Sep 21, 2021
1 task
Trott deleted the fix-tools branch September 25, 2022 17:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL