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: transfer the whole line into link when text contains url (#693) #737

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

penkzhou
Copy link
Contributor

@penkzhou penkzhou commented Mar 5, 2024

bug

#693

fix approach

  1. detect the text with url regrex
  2. if there is a url exist, split the text into three parts. The first part and the final part may not exist.add url attribute for the url part.
  3. if there is no url exist,just return the text.

test status

unit test: all pass.

…wy-IO#693)

fix the bug when pasting text in plain text with URL makes everything a link.
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.79%. Comparing base (d4d35c0) to head (e0c50bc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #737      +/-   ##
==========================================
+ Coverage   75.78%   75.79%   +0.01%     
==========================================
  Files         297      297              
  Lines       13750    13760      +10     
==========================================
+ Hits        10420    10430      +10     
  Misses       3330     3330              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jpenna
Copy link
Contributor

jpenna commented Mar 5, 2024

Looks good! It is worth adding tests to the highlighted lines in the "Files changed" tab.

@penkzhou
Copy link
Contributor Author

penkzhou commented Mar 5, 2024

Looks good! It is worth adding tests to the highlighted lines in the "Files changed" tab.

ok. I'll look into it.

@jpenna
Copy link
Contributor

jpenna commented Mar 5, 2024

Great, thanks! You have to fix the commit message, but otherwise it looks good to go

@LucasXu0
Copy link
Collaborator

LucasXu0 commented Mar 6, 2024

Never mind. I can squash this PR. LGTM.

@LucasXu0 LucasXu0 merged commit 0ad1986 into AppFlowy-IO:main Mar 6, 2024
9 of 10 checks passed
q200892907 added a commit to q200892907/appflowy-editor that referenced this pull request Mar 12, 2024
* main:
  feat: disable converting heading block to numbered list block (AppFlowy-IO#740)
  fix: xtra space from numbered list item (AppFlowy-IO#724)
  fIx: disable tableActionHandler when the editorState is not editable (AppFlowy-IO#733)
  feat: add fixed toolbar example (AppFlowy-IO#739)
  chore: bump version 2.3.3 (AppFlowy-IO#735)
  fix: transfer the whole line into link when text contains url (AppFlowy-IO#693) (AppFlowy-IO#737)
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.

3 participants