Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(helpers): add missing dir attribute for right-to-left languages #24

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

lihbr
Copy link
Member

@lihbr lihbr commented Oct 29, 2024

Resolves: https://prismic-team.slack.com/archives/C014VAACCQL/p1729780207755199

Description

This PR updates the default richtext serializer to honor the direction property of rich text nodes and adds the appropriate dir attribute on right-to-left text nodes.

Related:

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Copy link
Member

@angeloashmore angeloashmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect 👌

It's interesting to compare the simplicity of the Svelte implementation to the React and HTML versions. It's the most recent implementation—maybe there's something about it we should port to the other packages.

@lihbr lihbr merged commit ecfabf2 into master Oct 30, 2024
12 checks passed
@lihbr lihbr deleted the lh/fix-add-missing-dir-attribute branch October 30, 2024 10:49
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