Skip to content

javascript-library.md: unwrap HTMLBlock; markdown prose + indented HTML tables#48

Merged
jduval23 merged 1 commit into
rokudev:v2.0from
chrisdp:unwrap-javascript-library-tables
May 18, 2026
Merged

javascript-library.md: unwrap HTMLBlock; markdown prose + indented HTML tables#48
jduval23 merged 1 commit into
rokudev:v2.0from
chrisdp:unwrap-javascript-library-tables

Conversation

@chrisdp
Copy link
Copy Markdown
Contributor

@chrisdp chrisdp commented May 15, 2026

Summary

The whole body of javascript-library.md was wrapped in a JSX <HTMLBlock>{...}</HTMLBlock> template literal. ReadMe doesn't run its markdown processor inside HTMLBlock, 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):

  • 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 &lt; / &gt; / &amp; 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> 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).

…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 &lt;/&gt;/&amp; 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).
@jduval23 jduval23 merged commit 06607fc into rokudev:v2.0 May 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants