javascript-library.md: unwrap HTMLBlock; markdown prose + indented HTML tables#48
Merged
Merged
Conversation
…ML tables
The whole body of this page was wrapped in a JSX
<HTMLBlock>{`...`}</HTMLBlock> template literal, which kept ReadMe's
markdown processor from rendering the 9 [text](doc:slug) references
inside (sideloading, WebDriver, the inner method-section anchors used
to cross-link keywords, etc.).
Drop the wrapper and rebuild the page the same way as content-metadata:
- Prose (paragraphs, lists, headings) is plain markdown.
- The Confluence-era <div class="markdown-body developer-content-body">
styling wrapper around the whole body is dropped.
- HTML tables stay HTML but are indented by nesting depth. Cells with
in-table code samples keep their <pre><code class="language-javascript">
wrapper so Prism applies JS syntax highlighting.
- Standalone <pre><code>...</code></pre> snippets become markdown
```javascript fenced blocks, with internal whitespace preserved
(extracted as placeholders before markdownify so indents survive)
and </>/& entities decoded.
- Blank lines inside in-cell <pre><code> blocks are collapsed because
they break HTML containment when the cell is parsed by markdown.
- Each in-cell <pre><code> block is dedented so its inner code lines
line up with the first line (source had 14-space leading indent
inherited from the HTMLBlock wrapper context).
- { and } in <td>/in-cell-<pre><code> text are written as JSX template
literals ({'{'} / {'}'}) so MDX doesn't read them as JSX expressions.
- Link styles unified to markdown: <a href="/dev/docs/SLUG"> and
[text](/dev/docs/SLUG) become [text](doc:SLUG); external
<a href="URL"> with matching text becomes [URL](URL).
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The whole body of
javascript-library.mdwas wrapped in a JSX<HTMLBlock>{...}</HTMLBlock>template literal. ReadMe doesn't run its markdown processor insideHTMLBlock, so the 9[text](doc:slug)references inside (sideloading instructions, WebDriver, and the inner cross-links between keyword sections) rendered literally.Changes
Drop the wrapper and rebuild the page the same way as PR #47 (content-metadata):
<div class="markdown-body developer-content-body">styling wrapper around the whole body is dropped.<pre><code class="language-javascript">wrapper so Prism applies JS syntax highlighting.<pre><code>...</code></pre>snippets become markdown```javascriptfenced blocks, with internal whitespace preserved (extracted as placeholders before markdownify so indents survive) and</>/&entities decoded.<pre><code>blocks are collapsed because they break HTML containment when the cell is parsed by markdown.<pre><code>is dedented so its inner code lines line up with the first line (source had 14-space leading indent inherited from the HTMLBlock wrapper context).{and}in<td>/ in-cell-<pre><code>text are written as JSX template literals ({'{'}/{'}'}) so MDX doesn't read them as JSX expressions.<a href="/dev/docs/SLUG">and[text](/dev/docs/SLUG)become[text](doc:SLUG); external<a href="URL">with matching text becomes[URL](URL).