Skip to content

fix: Italics not being shown in the description after saving#10848

Merged
pumfleet merged 3 commits intocalcom:mainfrom
abhijeetsingh-22:fix_event_description_formatting
Aug 24, 2023
Merged

fix: Italics not being shown in the description after saving#10848
pumfleet merged 3 commits intocalcom:mainfrom
abhijeetsingh-22:fix_event_description_formatting

Conversation

@abhijeetsingh-22
Copy link
Copy Markdown
Contributor

What does this PR do?

This fixes the issue of Italic text not showing in the description of the event after saving the event.
The issue was caused due to the way Rich Text editor formats the HTML for the italic text. It wraps the italic text in the <i> as well as <em> tag. And the HTML-to-makdown library that is being used was adding _ twice making it bold rather than italic.

Change Made

Added a rule in the turndownService (HTML-to-markdown) to ignore the <em> tag. This prevents the double _

Fixes #10828

Loom Video: Video Link

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

Try creating a new event and in the description try making text Italic. It should work as intended. Earlier the italic text was being shown as bold text on saving the event.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 18, 2023 8:02pm

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 18, 2023

Someone is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the 🐛 bug Something isn't working label Aug 18, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 18, 2023

Thank you for following the naming conventions! 🙏

@abhijeetsingh-22 abhijeetsingh-22 changed the title Fix event description formatting fix: Italics not being shown in the description after saving Aug 18, 2023
@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@PeerRich PeerRich added the Low priority Created by Linear-GitHub Sync label Aug 21, 2023
Copy link
Copy Markdown
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

LGTM. Tested works fine

Screenshot 2023-08-23 at 1 33 07 PM Screenshot 2023-08-23 at 1 33 33 PM

@pumfleet pumfleet merged commit 3e63c2b into calcom:main Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working Low priority Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-2364] Italics doesn't save as italics in the event description

4 participants