Skip to content

HTML containing bidirectional text is rendered incorrectly #2342

@xfq

Description

@xfq

Describe the bug

HTML containing bidirectional text is rendered incorrectly. See https://www.w3.org/International/questions/qa-bidi-source.en.html for some examples. For some lines containing RTL text, some punctuation marks appear in incorrect positions.

Reproduction

Open https://github.com/xfq/testing/blob/main/bidi-source/index.html in phcode.

Expected behavior

phcode should recognize markup as special constructs and produces a sensible display order for the characters in the source code.

OS, Browser and Phoenix versions

Version 4.0.3 (20250131.060146) on macOS

logs or debug stack trace if any

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions