Skip to content

Zero-width spaces causing character rendering issues in preview environment #1821

@patrikbraborec

Description

@patrikbraborec

Zero-width spaces are appearing as weird characters in markdown files in the preview environment, while they render correctly in production.

The issue is caused by zero-width spaces that Docusaurus adds to links for proper display (related to facebook/docusaurus#5990)

  • Production: .md files are served with text/markdown; charset=utf-8 from GitHub Pages, rendering Unicode characters correctly
  • Preview: .md files are served with just text/markdown from S3, causing Unicode characters to display as ASCII, showing the zero-width spaces as visible weird characters

Impact

Affects preview PRs where markdown files display incorrectly
Does not affect production environment

Proposed Solutions

Quick fix: Implement a post-processing step that runs search & replace on built .md files to remove zero-width spaces
Comprehensive fix: Fix the issue in the plugin that generates the markdown files (https://github.com/signalwire/docusaurus-plugins)

References

Related Docusaurus issue: facebook/docusaurus#5990

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-docsIssues owned by technical writing team.t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions