Skip to content

fix: add patches to Docusaurus for until they're merged upstream - #89

Merged
SethFalco merged 2 commits into
svg:mainfrom
SethFalco:merge-patches
Aug 15, 2026
Merged

fix: add patches to Docusaurus for until they're merged upstream#89
SethFalco merged 2 commits into
svg:mainfrom
SethFalco:merge-patches

Conversation

@SethFalco

@SethFalco SethFalco commented Aug 15, 2026

Copy link
Copy Markdown
Member

See commit message(s).

I'm eager to have these fixed on prod already since I don't know when or if the PRs will actually get merged, and the search experience is pretty poor at the moment without this.

There were workarounds for this:

  • For the external link icons, I could've swizzled.
  • For the title/descriptions/search, I could've defined an explicit title/description.

However, I wanted to match my PR so that the patches could be more thoroughly tested.

Related

When the client is configured to use a different font-size than the default
(i.e. on the OS or in browser settings) the external link icon became
disproportionately sized relative to the text. This converts the hardcodes pixel
values to rem.

I wrote a patch for it for Docusaurus. See:
facebook/docusaurus#12336

This can be reverted when/if it's merged and deployed upstream.
In Markdown/MDX, any special characters between inline code should be displayed
literally. The problem at hand was HTML tags, but this would apply to
underscores, colons, etc. as well.

The description was being mangled before, for example:
"… of `<hn>` tags for headings." → "… of `` tags for headings."

Now we correctly set the description:
"… of <hn> tags for headings." → "… of <hn> tags for headings."

It might've be better if we parsed the content character by character, and
just skipped the pointer to after the inline code when found, but that'd be a
drastic change for little benefit. Instead, I took the marker approach
proposed by Sébastien Lorber—using U+FFFE and U+FFFF. I settled on them since
they are "not characters" so we shouldn't encounter them organically.

See: https://en.wikipedia.org/wiki/Specials_(Unicode_block)

I've opened a PR upstream to fix this. This can be removed when/if it's
merged in Docusaurus:
facebook/docusaurus#11821
@SethFalco
SethFalco merged commit 86da7d3 into svg:main Aug 15, 2026
4 checks passed
@SethFalco
SethFalco deleted the merge-patches branch August 15, 2026 22:04
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.

1 participant