Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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

Merged
danielroe merged 14 commits intomainfromuserquin/feat-add-rtl-text-detection
Jan 4, 2024

Conversation

userquin
Copy link
Member

@userquinuserquin commentedJan 2, 2024
edited
Loading

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

@stackblitzStackBlitz
Copy link

Review PR in StackBlitz CodeflowRun & review this pull request inStackBlitz Codeflow.

@netlifyNetlify
Copy link

netlifybot commentedJan 2, 2024
edited
Loading

Deploy Preview forelk-zone ready!

NameLink
🔨 Latest commit053e866
🔍 Latest deploy loghttps://app.netlify.com/sites/elk-zone/deploys/659706cddf2db1000861b30c
😎 Deploy Previewhttps://deploy-preview-2541--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site configuration.

@netlifyNetlify
Copy link

netlifybot commentedJan 2, 2024
edited
Loading

Deploy Preview forelk-docs canceled.

NameLink
🔨 Latest commit053e866
🔍 Latest deploy loghttps://app.netlify.com/sites/elk-docs/deploys/659706cdde45d200084e8da1

@userquin
Copy link
MemberAuthor

We should change alsocomponent/tag/TargCard.vue SFC

Copy link
Member

@danielroedanielroe left a comment
edited
Loading

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

it('block with injected html, with a known language',async()=>{
const{ formatted}=awaitrender(`
<pre>
<code>
&lt;a href="#">click me&lt;/a>
</code>
</pre>
`)
expect(formatted).toMatchSnapshot()
})
would be the icing on the cake

userquin reacted with thumbs up emoji
@userquin
Copy link
MemberAuthor

Adding the test found a testing bug, I'll check it again later.

We also need to add a test containing<a><bdi>....

@userquin
Copy link
MemberAuthor

userquin commentedJan 4, 2024
edited
Loading

TheRouterLink mock component wasn't rendering the children, that's why the bdi and its content not being rendered (in fact any anchor content in any test).

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))

thebdi content is there.

@userquinuserquin changed the titlefeat: add LTR/RTL hashtags supportfeat: add LTR/RTL in hashtags and mentions supportJan 4, 2024
@userquin
Copy link
MemberAuthor

userquin commentedJan 4, 2024
edited
Loading

Mentions:

imagen

Hashtags:

imagen

Tags page title:

imagen

Explore tags page:

imagen

@danielroedanielroe added this pull request to themerge queueJan 4, 2024
Merged via the queue intomain with commit3adf92eJan 4, 2024
@danielroedanielroe deleted the userquin/feat-add-rtl-text-detection branchJanuary 4, 2024 19:53
HawtinZeng pushed a commit to HawtinZeng/elk that referenced this pull requestJan 7, 2024
maybeanerd pushed a commit to maybeanerd/crab that referenced this pull requestJan 28, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@danielroedanielroedanielroe approved these changes

@patak-devpatak-devAwaiting requested review from patak-dev

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

LTR/RTL support for tags
2 participants
@userquin@danielroe

[8]ページ先頭

©2009-2025 Movatter.jp