Skip to content

Fix editor markdown not incrementing in a numbered list #33187

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

Merged
merged 7 commits into from
Jan 10, 2025

Conversation

harryvince
Copy link
Contributor

Amended the logic for newPrefix in the MarkdownEditor to resolve incorrect number ordering.

Fixes #33184

Attached screenshot of fixed input similar to issue
Screenshot 2025-01-09 at 23 59 24

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 10, 2025
@harryvince harryvince force-pushed the main branch 6 times, most recently from cd32276 to fd815c8 Compare January 10, 2025 00:31
@harryvince harryvince changed the title fix: editor markdown not incrementing in a numbered list Fix editor markdown not incrementing in a numbered list Jan 10, 2025
@wxiaoguang
Copy link
Contributor

I will try to make a full fix here, to handle all edge cases including:

1. a
2. b <- enter here, then last line should be "4. c"
3. c

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 10, 2025
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 10, 2025
@wxiaoguang
Copy link
Contributor

Now most edge cases should have been fixed, and added more tests

@wxiaoguang wxiaoguang added the backport/v1.23 This PR should be backported to Gitea 1.23 label Jan 10, 2025
@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Jan 10, 2025
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

So many edge cases .... I have done my best 🤣

@GiteaBot GiteaBot removed the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 10, 2025
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jan 10, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 10, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 10, 2025
@lunny lunny enabled auto-merge (squash) January 10, 2025 07:28
@lunny lunny merged commit d7ec23f into go-gitea:main Jan 10, 2025
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 10, 2025
wxiaoguang added a commit to wxiaoguang/gitea that referenced this pull request Jan 10, 2025
Amended the logic for newPrefix in the MarkdownEditor to resolve
incorrect number ordering.

Fixes go-gitea#33184

Attached screenshot of fixed input similar to issue 
<img width="175" alt="Screenshot 2025-01-09 at 23 59 24"
src="https://github.com/user-attachments/assets/dfa23cf1-f3db-4b5e-99d2-a71bbcb289a8"
/>

---------

Co-authored-by: wxiaoguang <[email protected]>
lunny pushed a commit that referenced this pull request Jan 10, 2025
@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Jan 10, 2025
@lunny lunny added the backport/done All backports for this PR have been created label Jan 10, 2025
@go-gitea go-gitea deleted a comment from GiteaBot Jan 10, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 14, 2025
* giteaofficial/main: (21 commits)
  Support public code/issue access for private repositories (go-gitea#33127)
  Validate that the tag doesn't exist when creating a tag via the web (go-gitea#33241)
  [skip ci] Updated translations via Crowdin
  Switch back to `vue-tsc` (go-gitea#33248)
  Let API create and edit system webhooks, attempt 2 (go-gitea#33180)
  Fix incorrect ref "blob" (go-gitea#33240)
  Refactor RefName (go-gitea#33234)
  Refactor context RefName and RepoAssignment (go-gitea#33226)
  [skip ci] Updated translations via Crowdin
  Fix upload file form (go-gitea#33230)
  Fix mirror bug (go-gitea#33224)
  Remove unused CSS styles and move some styles to proper files (go-gitea#33217)
  Refactor context repository (go-gitea#33202)
  [skip ci] Updated translations via Crowdin
  Fix unpin hint on the pinned pull requests (go-gitea#33207)
  fix(cache): cache test triggered by non memory cache (go-gitea#33220)
  Update README.md (go-gitea#33149)
  Fix editor markdown not incrementing in a numbered list (go-gitea#33187)
  Some small refactors (go-gitea#33144)
  Fix sync fork for consistency (go-gitea#33147)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markdown editor doesn't increment points in numbered lists on enter
4 participants