Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Remove unnecessary escape characters in markdown output #800

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

jonnyandrew
Copy link
Contributor

Problem

Markdown formatted output (used for the plain text body part of a Matrix message) contains unnecessary escape characters.

For example, the message Hello, world! is output as Hello\, world\!.

See #799 for more details.

Solution

Do not escape special characters in markdown output as there is no requirement for valid/machine readable markdown in plain text Matrix messages.

@jonnyandrew jonnyandrew requested a review from a team September 11, 2023 09:24
@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +1.60% 🎉

Comparison is base (2f1c7cc) 88.34% compared to head (71603ce) 89.94%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #800      +/-   ##
============================================
+ Coverage     88.34%   89.94%   +1.60%     
============================================
  Files           154       82      -72     
  Lines         17856    14693    -3163     
  Branches        862        0     -862     
============================================
- Hits          15775    13216    -2559     
+ Misses         1850     1477     -373     
+ Partials        231        0     -231     
Flag Coverage Δ
uitests ?
uitests-android ?
uitests-ios ?
unittests 89.94% <100.00%> (+2.87%) ⬆️
unittests-android ?
unittests-ios ?
unittests-rust 89.94% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
crates/wysiwyg/src/dom/to_markdown.rs 73.07% <ø> (ø)
crates/wysiwyg/src/dom/nodes/container_node.rs 95.36% <100.00%> (-0.01%) ⬇️
crates/wysiwyg/src/dom/nodes/text_node.rs 94.02% <100.00%> (-0.30%) ⬇️

... and 72 files with indirect coverage changes

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

@jonnyandrew jonnyandrew merged commit e1ecd27 into main Sep 12, 2023
8 checks passed
@jonnyandrew jonnyandrew deleted the fix/markdown-escape branch September 12, 2023 08:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markdown output contains unnecessary escape characters
3 participants