Skip to content

fix(NcRichText): handle new lines when parsing reference links#8565

Merged
Antreesy merged 1 commit into
mainfrom
fix/richtext-parse-newlines
May 22, 2026
Merged

fix(NcRichText): handle new lines when parsing reference links#8565
Antreesy merged 1 commit into
mainfrom
fix/richtext-parse-newlines

Conversation

@Antreesy

Copy link
Copy Markdown
Contributor

☑️ Resolves

  • Fix parsing the text into reference links
    • Replace whitespace-like characters (new line, caret return, tab) with a whitespace

Test example:

https://nextcloud.com/blog/event/nextcloud-talk-vs-microsoft-teams-a-better-alternative/

June 3rd

Is fed into prepareReferenceSource() as:

https://nextcloud.com/blog/event/nextcloud-talk-vs-microsoft-teams-a-better-alternative/\n\nJune 3rd

And then mdast-util-to-string returns it as:

https://nextcloud.com/blog/event/nextcloud-talk-vs-microsoft-teams-a-better-alternative/June 3rd

Which NcReferenceList receives as a reference link (valid by URL_PATTERN)

🖼️ Screenshots

🏚️ Before 🏡 After
image image

🚧 Tasks

  • ...

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@Antreesy Antreesy added this to the 9.8.1 milestone May 22, 2026
@Antreesy Antreesy requested review from DorraJaouad and ShGKme May 22, 2026 09:07
@Antreesy Antreesy self-assigned this May 22, 2026
@Antreesy Antreesy added bug Something isn't working 3. to review Waiting for reviews feature: richtext Related to the richtext component labels May 22, 2026
@Antreesy

Copy link
Copy Markdown
Contributor Author

/backport to stable8

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy force-pushed the fix/richtext-parse-newlines branch from 3372284 to 51f9612 Compare May 22, 2026 09:15
@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.60%. Comparing base (64f836d) to head (51f9612).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8565   +/-   ##
=======================================
  Coverage   54.60%   54.60%           
=======================================
  Files         106      106           
  Lines        3443     3443           
  Branches     1004     1005    +1     
=======================================
  Hits         1880     1880           
  Misses       1322     1322           
  Partials      241      241           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Antreesy Antreesy merged commit 33787ae into main May 22, 2026
27 checks passed
@Antreesy Antreesy deleted the fix/richtext-parse-newlines branch May 22, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working feature: richtext Related to the richtext component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants