- Notifications
You must be signed in to change notification settings - Fork583
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat: add LTR/RTL in hashtags and mentions support#2541
Conversation
|
✅ Deploy Preview forelk-zone ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
✅ Deploy Preview forelk-docs canceled.
|
We should change also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this looks perfect 👌
If you wanted, a test just after
elk/tests/nuxt/content-rich.test.ts
Lines 230 to 239 in74138a9
it('block with injected html, with a known language',async()=>{ | |
const{ formatted}=awaitrender(` | |
<pre> | |
<code> | |
<a href="#">click me</a> | |
</code> | |
</pre> | |
`) | |
expect(formatted).toMatchSnapshot() | |
}) |
Adding the test found a testing bug, I'll check it again later. We also need to add a test containing |
The I added the default slot and moved all inlined snapshots to the snapshot file, now all anchor rendered properly. There is still an issue with the bdi parsing test, ultrahtml is able to parse the tree properly but but rendering it doesn't work, the children not being rendered:
If I include this codehere: functiontraverse(node:Node,level=0){if(node.type===ELEMENT_NODE||node.type===DOCUMENT_NODE){console.log(' '.repeat(level*2),node.name)if(node.children)node.children.forEach(n=>traverse(n,level+1))}elseif(node.type===TEXT_NODE&&node.value){console.log(' '.repeat(level*2),node.value)}}traverse(parse(html)) the |
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Daniel Roe <daniel@roe.dev>
Right now only hashtags, mentions (no idea if an account can have arabic text), tags and explore/tags pages, we can check later body support.
This PR usingbdi tag, RTL text detection has been removed, there is no need.
closes#2540