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: preserve white spaces when parsing the default editor #5292

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

LIlGG
Copy link
Member

@LIlGG LIlGG commented Jan 31, 2024

What type of PR is this?

/kind bug
/area editor
/area console
/milestone 2.12.x

What this PR does / why we need it:

在默认富文本编辑器解析文本时,使其保留空白符。

see https://prosemirror.net/docs/ref/#model.ParseOptions.preserveWhitespace

How to test it?

  1. 输入一串文字,在其开始、结束、内容中分别键入空白字符。
  2. 保存内容
  3. 刷新页面,查看空白字符是否保留。

Which issue(s) this PR fixes:

Fixes #5260

Does this PR introduce a user-facing change?

解决默认富文本编辑器内容刷新后空白字符丢失的问题

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Jan 31, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.12.x milestone Jan 31, 2024
Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e15923b) 57.07% compared to head (1610fa5) 57.07%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5292   +/-   ##
=========================================
  Coverage     57.07%   57.07%           
  Complexity     3329     3329           
=========================================
  Files           587      587           
  Lines         18956    18956           
  Branches       1402     1402           
=========================================
  Hits          10820    10820           
  Misses         7558     7558           
  Partials        578      578           

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

@f2c-ci-robot f2c-ci-robot bot added area/editor Issues or PRs related to the Editor area/console Issues or PRs related to the Halo Console labels Jan 31, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from Aanko and QuentinHsu January 31, 2024 09:48
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jan 31, 2024
@JohnNiang JohnNiang modified the milestones: 2.12.x, 2.12.0 Jan 31, 2024
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/approve

Copy link

f2c-ci-robot bot commented Jan 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 31, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit dff6522 into halo-dev:main Jan 31, 2024
8 checks passed
@LIlGG LIlGG deleted the fix/editor-preserve-white-space branch January 31, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/console Issues or PRs related to the Halo Console area/editor Issues or PRs related to the Editor kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

用默认编辑器编辑文章敲空格键输入空格保存后空格消失
3 participants